Last active
May 17, 2018 16:09
-
-
Save ncdc/1e07721200080e9b8b9d66852f0f6877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// option 1 | |
arkplugin.NewSimpleServer(). | |
RegisterObjectStores(map[string]func() cloudprovider.ObjectStore{ | |
"aws": setupAws, | |
"azure": azure.NewObjectStore, | |
"gcp": setupGcp, | |
}). | |
RegisterBlockStores(map[string]func() cloudprovider.BlockStore{ | |
"aws": aws.NewBlockStore, | |
"azure": azure.NewBlockStore, | |
"gcp": abc, | |
}). | |
Serve() | |
// option 2 | |
arkplugin.NewSimpleServer(). | |
RegisterObjectStore("aws", xxx). | |
RegisterObjectStore("azure", azure.NewObjectStore). | |
RegisterObjectStore("gcp", yyy). | |
RegisterBlockStore("aws", aws.NewBlockStore). | |
RegisterBlockStore("azure", azure.NewBlockStore). | |
RegisterBlockStore("gcp": zzz). | |
Serve() | |
// option 3 | |
arkplugin.NewSimpleServer(). | |
Register(PluginKindObjectStore, "aws", asdf). | |
Register(PluginKindObjectStore, "gcp", gdgs). | |
Serve() | |
// option 4 | |
arkplugin.NewSimpleServer(). | |
RegisterObjectStores( | |
"aws", setupAws, | |
"gcp", setupGcp, | |
"azure", setupAzure, | |
). | |
RegisterBlockStores( | |
... | |
). | |
Serve() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment