config

package
v0.0.0-09-18-2015.23-1... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2015 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidName

func IsValidName(name string) bool

IsValidName validates configuration objects supported by libnetwork

Types

type ClusterCfg

type ClusterCfg struct {
	Discovery string
	Address   string
	Heartbeat uint64
}

ClusterCfg represents cluster configuration

type Config

type Config struct {
	Daemon    DaemonCfg
	Cluster   ClusterCfg
	Datastore DatastoreCfg
}

Config encapsulates configurations of various Libnetwork components

func ParseConfig

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

ParseConfig parses the libnetwork configuration file

func (*Config) ProcessOptions

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

ProcessOptions processes options and stores it in config

type DaemonCfg

type DaemonCfg struct {
	Debug          bool
	DefaultNetwork string
	DefaultDriver  string
	Labels         []string
}

DaemonCfg represents libnetwork core configuration

type DatastoreCfg

type DatastoreCfg struct {
	Embedded bool
	Client   DatastoreClientCfg
}

DatastoreCfg represents Datastore configuration.

type DatastoreClientCfg

type DatastoreClientCfg struct {
	Provider string
	Address  string
}

DatastoreClientCfg represents Datastore Client-only mode configuration

type Option

type Option func(c *Config)

Option is a option setter function type used to pass varios configurations to the controller

func OptionDefaultDriver

func OptionDefaultDriver(dd string) Option

OptionDefaultDriver function returns an option setter for default driver

func OptionDefaultNetwork

func OptionDefaultNetwork(dn string) Option

OptionDefaultNetwork function returns an option setter for a default network

func OptionKVProvider

func OptionKVProvider(provider string) Option

OptionKVProvider function returns an option setter for kvstore provider

func OptionKVProviderURL

func OptionKVProviderURL(url string) Option

OptionKVProviderURL function returns an option setter for kvstore url

func OptionLabels

func OptionLabels(labels []string) Option

OptionLabels function returns an option setter for labels

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL