Documentation ¶
Index ¶
- type Config
- type Option
- func OptionActiveSandboxes(sandboxes map[string]interface{}) Option
- func OptionDataDir(dataDir string) Option
- func OptionDefaultAddressPoolConfig(addressPool []*ipamutils.NetworkToSplit) Option
- func OptionDefaultDriver(dd string) Option
- func OptionDefaultNetwork(dn string) Option
- func OptionDriverConfig(networkType string, config map[string]any) Option
- func OptionExecRoot(execRoot string) Option
- func OptionLabels(labels []string) Option
- func OptionNetworkControlPlaneMTU(exp int) Option
- func OptionPluginGetter(pg plugingetter.PluginGetter) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DataDir string // ExecRoot is the base-path for libnetwork external key listeners // (created in "<ExecRoot>/libnetwork/<Controller-Short-ID>.sock"), // and is passed as "-exec-root: argument for "libnetwork-setkey". // // It is only used on Linux, but referenced in some "unix" files // (linux and freebsd). // // FIXME(thaJeztah): ExecRoot is only used for Controller.startExternalKeyListener(), but "libnetwork-setkey" is only implemented on Linux. ExecRoot string DefaultNetwork string DefaultDriver string Labels []string ClusterProvider cluster.Provider NetworkControlPlaneMTU int DefaultAddressPool []*ipamutils.NetworkToSplit Scope datastore.ScopeCfg ActiveSandboxes map[string]interface{} PluginGetter plugingetter.PluginGetter // contains filtered or unexported fields }
Config encapsulates configurations of various Libnetwork components
type Option ¶
type Option func(c *Config)
Option is an option setter function type used to pass various configurations to the controller
func OptionActiveSandboxes ¶
OptionActiveSandboxes function returns an option setter for passing the sandboxes which were active during previous daemon life
func OptionDataDir ¶
OptionDataDir function returns an option setter for data folder
func OptionDefaultAddressPoolConfig ¶
func OptionDefaultAddressPoolConfig(addressPool []*ipamutils.NetworkToSplit) Option
OptionDefaultAddressPoolConfig function returns an option setter for default address pool
func OptionDefaultDriver ¶
OptionDefaultDriver function returns an option setter for default driver
func OptionDefaultNetwork ¶
OptionDefaultNetwork function returns an option setter for a default network
func OptionDriverConfig ¶
OptionDriverConfig returns an option setter for driver configuration.
func OptionExecRoot ¶
OptionExecRoot function returns an option setter for exec root folder.
On Linux, it sets both the controller's ExecRoot and osl.basePath, whereas on FreeBSD, it only sets the controller's ExecRoot. It is a no-op on other platforms.
func OptionLabels ¶
OptionLabels function returns an option setter for labels
func OptionNetworkControlPlaneMTU ¶
OptionNetworkControlPlaneMTU function returns an option setter for control plane MTU
func OptionPluginGetter ¶
func OptionPluginGetter(pg plugingetter.PluginGetter) Option
OptionPluginGetter returns a plugingetter for remote drivers.