Guest User

Untitled

a guest
May 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. // option 1
  2. arkplugin.NewSimpleServer().
  3. RegisterObjectStores(map[string]func() cloudprovider.ObjectStore{
  4. "aws": setupAws,
  5. "azure": azure.NewObjectStore,
  6. "gcp": setupGcp,
  7. }).
  8. RegisterBlockStores(map[string]func() cloudprovider.BlockStore{
  9. "aws": aws.NewBlockStore,
  10. "azure": azure.NewBlockStore,
  11. "gcp": abc,
  12. }).
  13. Serve()
  14.  
  15. // option 2
  16. arkplugin.NewSimpleServer().
  17. RegisterObjectStore("aws", xxx).
  18. RegisterObjectStore("azure", azure.NewObjectStore).
  19. RegisterObjectStore("gcp", yyy).
  20. RegisterBlockStore("aws", aws.NewBlockStore).
  21. RegisterBlockStore("azure", azure.NewBlockStore).
  22. RegisterBlockStore("gcp": zzz).
  23. Serve()
  24.  
  25. // option 3
  26. arkplugin.NewSimpleServer().
  27. Register(PluginKindObjectStore, "aws", asdf).
  28. Register(PluginKindObjectStore, "gcp", gdgs).
  29. Serve()
  30.  
  31. // option 4
  32. arkplugin.NewSimpleServer().
  33. RegisterObjectStores(
  34. "aws", setupAws,
  35. "gcp", setupGcp,
  36. "azure", setupAzure,
  37. ).
  38. RegisterBlockStores(
  39. ...
  40. ).
  41. Serve()
Add Comment
Please, Sign In to add comment