docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/config Index | Files

package config

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/config"

Index

Package Files

config.go

func IsValidName Uses

func IsValidName(name string) bool

IsValidName validates configuration objects supported by libnetwork

type ClusterCfg Uses

type ClusterCfg struct {
    Watcher   discovery.Watcher
    Address   string
    Discovery string
    Heartbeat uint64
}

ClusterCfg represents cluster configuration

type Config Uses

type Config struct {
    Daemon          DaemonCfg
    Cluster         ClusterCfg
    Scopes          map[string]*datastore.ScopeCfg
    ActiveSandboxes map[string]interface{}
    PluginGetter    plugingetter.PluginGetter
}

Config encapsulates configurations of various Libnetwork components

func ParseConfig Uses

func ParseConfig(tomlCfgFile string) (*Config, error)

ParseConfig parses the libnetwork configuration file

func ParseConfigOptions Uses

func ParseConfigOptions(cfgOptions ...Option) *Config

ParseConfigOptions parses the configuration options and returns a reference to the corresponding Config structure

func (*Config) LoadDefaultScopes Uses

func (c *Config) LoadDefaultScopes(dataDir string)

LoadDefaultScopes loads default scope configs for scopes which doesn't have explicit user specified configs.

func (*Config) ProcessOptions Uses

func (c *Config) ProcessOptions(options ...Option)

ProcessOptions processes options and stores it in config

type DaemonCfg Uses

type DaemonCfg struct {
    Debug                  bool
    Experimental           bool
    DataDir                string
    ExecRoot               string
    DefaultNetwork         string
    DefaultDriver          string
    Labels                 []string
    DriverCfg              map[string]interface{}
    ClusterProvider        cluster.Provider
    NetworkControlPlaneMTU int
    DefaultAddressPool     []*ipamutils.NetworkToSplit
}

DaemonCfg represents libnetwork core configuration

type Option Uses

type Option func(c *Config)

Option is an option setter function type used to pass various configurations to the controller

func OptionActiveSandboxes Uses

func OptionActiveSandboxes(sandboxes map[string]interface{}) Option

OptionActiveSandboxes function returns an option setter for passing the sandboxes which were active during previous daemon life

func OptionDataDir Uses

func OptionDataDir(dataDir string) Option

OptionDataDir function returns an option setter for data folder

func OptionDefaultAddressPoolConfig Uses

func OptionDefaultAddressPoolConfig(addressPool []*ipamutils.NetworkToSplit) Option

OptionDefaultAddressPoolConfig function returns an option setter for default address pool

func OptionDefaultDriver Uses

func OptionDefaultDriver(dd string) Option

OptionDefaultDriver function returns an option setter for default driver

func OptionDefaultNetwork Uses

func OptionDefaultNetwork(dn string) Option

OptionDefaultNetwork function returns an option setter for a default network

func OptionDiscoveryAddress Uses

func OptionDiscoveryAddress(address string) Option

OptionDiscoveryAddress function returns an option setter for self discovery address

func OptionDiscoveryWatcher Uses

func OptionDiscoveryWatcher(watcher discovery.Watcher) Option

OptionDiscoveryWatcher function returns an option setter for discovery watcher

func OptionDriverConfig Uses

func OptionDriverConfig(networkType string, config map[string]interface{}) Option

OptionDriverConfig returns an option setter for driver configuration.

func OptionDynamicPortRange Uses

func OptionDynamicPortRange(in string) Option

OptionDynamicPortRange function returns an option setter for service port allocation range

func OptionExecRoot Uses

func OptionExecRoot(execRoot string) Option

OptionExecRoot function returns an option setter for exec root folder

func OptionExperimental Uses

func OptionExperimental(exp bool) Option

OptionExperimental function returns an option setter for experimental daemon

func OptionKVOpts Uses

func OptionKVOpts(opts map[string]string) Option

OptionKVOpts function returns an option setter for kvstore options

func OptionKVProvider Uses

func OptionKVProvider(provider string) Option

OptionKVProvider function returns an option setter for kvstore provider

func OptionKVProviderURL Uses

func OptionKVProviderURL(url string) Option

OptionKVProviderURL function returns an option setter for kvstore url

func OptionLabels Uses

func OptionLabels(labels []string) Option

OptionLabels function returns an option setter for labels

func OptionLocalKVProvider Uses

func OptionLocalKVProvider(provider string) Option

OptionLocalKVProvider function returns an option setter for kvstore provider

func OptionLocalKVProviderConfig Uses

func OptionLocalKVProviderConfig(config *store.Config) Option

OptionLocalKVProviderConfig function returns an option setter for kvstore config

func OptionLocalKVProviderURL Uses

func OptionLocalKVProviderURL(url string) Option

OptionLocalKVProviderURL function returns an option setter for kvstore url

func OptionNetworkControlPlaneMTU Uses

func OptionNetworkControlPlaneMTU(exp int) Option

OptionNetworkControlPlaneMTU function returns an option setter for control plane MTU

func OptionPluginGetter Uses

func OptionPluginGetter(pg plugingetter.PluginGetter) Option

OptionPluginGetter returns a plugingetter for remote drivers.

Package config imports 14 packages (graph). Updated 2020-02-23. Refresh now. Tools for package owners.