Documentation ¶
Index ¶
- func IsValidName(name string) bool
- type ClusterCfg
- type Config
- type DaemonCfg
- type Option
- func OptionAgent() Option
- func OptionBind(bind string) Option
- func OptionDataDir(dataDir string) Option
- func OptionDefaultDriver(dd string) Option
- func OptionDefaultNetwork(dn string) Option
- func OptionDiscoveryAddress(address string) Option
- func OptionDiscoveryWatcher(watcher discovery.Watcher) Option
- func OptionDriverConfig(networkType string, config map[string]interface{}) Option
- func OptionKVOpts(opts map[string]string) Option
- func OptionKVProvider(provider string) Option
- func OptionKVProviderURL(url string) Option
- func OptionLabels(labels []string) Option
- func OptionLocalKVProvider(provider string) Option
- func OptionLocalKVProviderConfig(config *store.Config) Option
- func OptionLocalKVProviderURL(url string) Option
- func OptionNeighbors(neighbors []string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidName ¶
IsValidName validates configuration objects supported by libnetwork
Types ¶
type ClusterCfg ¶
type ClusterCfg struct { Watcher discovery.Watcher Address string Discovery string Heartbeat uint64 }
ClusterCfg represents cluster configuration
type Config ¶
type Config struct { Daemon DaemonCfg Cluster ClusterCfg Scopes map[string]*datastore.ScopeCfg }
Config encapsulates configurations of various Libnetwork components
func ParseConfig ¶
ParseConfig parses the libnetwork configuration file
func ParseConfigOptions ¶
ParseConfigOptions parses the configuration options and returns a reference to the corresponding Config structure
func (*Config) LoadDefaultScopes ¶
LoadDefaultScopes loads default scope configs for scopes which doesn't have explicit user specified configs.
func (*Config) ProcessOptions ¶
ProcessOptions processes options and stores it in config
type DaemonCfg ¶
type DaemonCfg struct { Debug bool IsAgent bool DataDir string DefaultNetwork string DefaultDriver string Bind string Neighbors []string Labels []string DriverCfg map[string]interface{} }
DaemonCfg represents libnetwork core configuration
type Option ¶
type Option func(c *Config)
Option is an option setter function type used to pass various configurations to the controller
func OptionAgent ¶
func OptionAgent() Option
OptionAgent function returns an option setter for setting agent mode
func OptionBind ¶
OptionBind function returns an option setter for setting a bind interface or address
func OptionDataDir ¶
OptionDataDir function returns an option setter for data folder
func OptionDefaultDriver ¶
OptionDefaultDriver function returns an option setter for default driver
func OptionDefaultNetwork ¶
OptionDefaultNetwork function returns an option setter for a default network
func OptionDiscoveryAddress ¶
OptionDiscoveryAddress function returns an option setter for self discovery address
func OptionDiscoveryWatcher ¶
OptionDiscoveryWatcher function returns an option setter for discovery watcher
func OptionDriverConfig ¶
OptionDriverConfig returns an option setter for driver configuration.
func OptionKVOpts ¶
OptionKVOpts function returns an option setter for kvstore options
func OptionKVProvider ¶
OptionKVProvider function returns an option setter for kvstore provider
func OptionKVProviderURL ¶
OptionKVProviderURL function returns an option setter for kvstore url
func OptionLabels ¶
OptionLabels function returns an option setter for labels
func OptionLocalKVProvider ¶
OptionLocalKVProvider function returns an option setter for kvstore provider
func OptionLocalKVProviderConfig ¶
OptionLocalKVProviderConfig function returns an option setter for kvstore config
func OptionLocalKVProviderURL ¶
OptionLocalKVProviderURL function returns an option setter for kvstore url
func OptionNeighbors ¶
OptionNeighbors function returns an option setter for setting a list of neighbors to join.