Documentation ¶
Index ¶
- Constants
- Variables
- func CloudConfigDirFiles() []string
- func Dump(private, full bool) (string, error)
- func StringifyValues(data map[interface{}]interface{}) map[interface{}]interface{}
- func WriteToFile(data interface{}, filename string) error
- type CfgFunc
- type CloudConfig
- func (c *CloudConfig) Get(key string) (interface{}, error)
- func (c *CloudConfig) GetIgnoreOmitEmpty(key string) (interface{}, error)
- func (c *CloudConfig) Import(bytes []byte) (*CloudConfig, error)
- func (c *CloudConfig) Merge(values map[interface{}]interface{}) (*CloudConfig, error)
- func (c *CloudConfig) MergeBytes(bytes []byte) (*CloudConfig, error)
- func (c *CloudConfig) Save(cfgDiffs ...map[interface{}]interface{}) error
- func (c *CloudConfig) Set(key string, value interface{}) (map[interface{}]interface{}, error)
- type CloudInit
- type DockerConfig
- type RancherConfig
- type Repositories
- type Repository
- type SshConfig
- type StateConfig
- type UpgradeConfig
Constants ¶
View Source
const ( OEM = "/usr/share/ros/oem" DOCKER_BIN = "/usr/bin/docker" DOCKER_DIST_BIN = "/usr/bin/docker.dist" ROS_BIN = "/usr/bin/ros" SYSINIT_BIN = "/usr/bin/ros-sysinit" DOCKER_SYSTEM_HOME = "/var/lib/system-docker" DOCKER_SYSTEM_HOST = "unix:///var/run/system-docker.sock" DOCKER_HOST = "unix:///var/run/docker.sock" IMAGES_PATH = "/usr/share/ros" IMAGES_PATTERN = "images*.tar" MODULES_ARCHIVE = "/modules.tar" DEBUG = false SYSTEM_DOCKER_LOG = "/var/log/system-docker.log" LABEL = "label" HASH = "io.rancher.os.hash" ID = "io.rancher.os.id" DETACH = "io.rancher.os.detach" CREATE_ONLY = "io.rancher.os.createonly" RELOAD_CONFIG = "io.rancher.os.reloadconfig" SCOPE = "io.rancher.os.scope" REBUILD = "io.docker.compose.rebuild" SYSTEM = "system" OsConfigFile = "/usr/share/ros/os-config.yml" CloudConfigDir = "/var/lib/rancher/conf/cloud-config.d" CloudConfigBootFile = "/var/lib/rancher/conf/cloud-config.d/boot.yml" CloudConfigPrivateFile = "/var/lib/rancher/conf/cloud-config.d/private.yml" CloudConfigNetworkFile = "/var/lib/rancher/conf/cloud-config.d/network.yml" CloudConfigScriptFile = "/var/lib/rancher/conf/cloud-config-script" MetaDataFile = "/var/lib/rancher/conf/metadata" CloudConfigFile = "/var/lib/rancher/conf/cloud-config.yml" )
Variables ¶
Functions ¶
func StringifyValues ¶ added in v0.4.2
func StringifyValues(data map[interface{}]interface{}) map[interface{}]interface{}
Types ¶
type CfgFunc ¶ added in v0.4.0
type CfgFunc func(*CloudConfig) (*CloudConfig, error)
type CloudConfig ¶ added in v0.4.0
type CloudConfig struct { SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"` WriteFiles []config.File `yaml:"write_files"` Hostname string `yaml:"hostname"` DefaultHostname string `yaml:"default_hostname"` Rancher RancherConfig `yaml:"rancher,omitempty"` }
func ChainCfgFuncs ¶ added in v0.4.0
func ChainCfgFuncs(cfg *CloudConfig, cfgFuncs ...CfgFunc) (*CloudConfig, error)
func LoadConfig ¶
func LoadConfig() (*CloudConfig, error)
func NewConfig ¶
func NewConfig() *CloudConfig
func ReadConfig ¶ added in v0.3.2
func ReadConfig(bytes []byte, substituteMetadataVars bool, files ...string) (*CloudConfig, error)
func (*CloudConfig) Get ¶ added in v0.4.0
func (c *CloudConfig) Get(key string) (interface{}, error)
func (*CloudConfig) GetIgnoreOmitEmpty ¶ added in v0.4.4
func (c *CloudConfig) GetIgnoreOmitEmpty(key string) (interface{}, error)
func (*CloudConfig) Import ¶ added in v0.4.0
func (c *CloudConfig) Import(bytes []byte) (*CloudConfig, error)
func (*CloudConfig) Merge ¶ added in v0.4.0
func (c *CloudConfig) Merge(values map[interface{}]interface{}) (*CloudConfig, error)
func (*CloudConfig) MergeBytes ¶ added in v0.4.0
func (c *CloudConfig) MergeBytes(bytes []byte) (*CloudConfig, error)
func (*CloudConfig) Save ¶ added in v0.4.0
func (c *CloudConfig) Save(cfgDiffs ...map[interface{}]interface{}) error
func (*CloudConfig) Set ¶ added in v0.4.0
func (c *CloudConfig) Set(key string, value interface{}) (map[interface{}]interface{}, error)
type DockerConfig ¶ added in v0.2.0
type DockerConfig struct { TLS bool `yaml:"tls,omitempty"` TLSArgs []string `yaml:"tls_args,flow,omitempty"` Args []string `yaml:"args,flow,omitempty"` ExtraArgs []string `yaml:"extra_args,flow,omitempty"` ServerCert string `yaml:"server_cert,omitempty"` ServerKey string `yaml:"server_key,omitempty"` CACert string `yaml:"ca_cert,omitempty"` CAKey string `yaml:"ca_key,omitempty"` Environment []string `yaml:"environment,omitempty"` StorageContext string `yaml:"storage_context,omitempty"` Exec bool `yaml:"exec,omitempty"` }
func (*DockerConfig) AppendEnv ¶ added in v0.4.0
func (d *DockerConfig) AppendEnv() []string
func (*DockerConfig) FullArgs ¶ added in v0.4.0
func (d *DockerConfig) FullArgs() []string
type RancherConfig ¶ added in v0.4.0
type RancherConfig struct { Environment map[string]string `yaml:"environment,omitempty"` Services map[string]*project.ServiceConfig `yaml:"services,omitempty"` BootstrapContainers map[string]*project.ServiceConfig `yaml:"bootstrap,omitempty"` Autoformat map[string]*project.ServiceConfig `yaml:"autoformat,omitempty"` BootstrapDocker DockerConfig `yaml:"bootstrap_docker,omitempty"` CloudInit CloudInit `yaml:"cloud_init,omitempty"` Debug bool `yaml:"debug,omitempty"` RmUsr bool `yaml:"rm_usr,omitempty"` Log bool `yaml:"log,omitempty"` ForceConsoleRebuild bool `yaml:"force_console_rebuild,omitempty"` Disable []string `yaml:"disable,omitempty"` ServicesInclude map[string]bool `yaml:"services_include,omitempty"` Modules []string `yaml:"modules,omitempty"` Network netconf.NetworkConfig `yaml:"network,omitempty"` DefaultNetwork netconf.NetworkConfig `yaml:"default_network,omitempty"` Repositories Repositories `yaml:"repositories,omitempty"` Ssh SshConfig `yaml:"ssh,omitempty"` State StateConfig `yaml:"state,omitempty"` SystemDocker DockerConfig `yaml:"system_docker,omitempty"` Upgrade UpgradeConfig `yaml:"upgrade,omitempty"` Docker DockerConfig `yaml:"docker,omitempty"` }
type Repositories ¶ added in v0.3.0
type Repositories map[string]Repository
func (Repositories) ToArray ¶ added in v0.3.0
func (r Repositories) ToArray() []string
type SshConfig ¶ added in v0.2.0
type StateConfig ¶ added in v0.2.0
type StateConfig struct { Directory string `yaml:"directory,omitempty"` FsType string `yaml:"fstype,omitempty"` Dev string `yaml:"dev,omitempty"` Required bool `yaml:"required,omitempty"` Autoformat []string `yaml:"autoformat,omitempty"` FormatZero bool `yaml:"formatzero,omitempty"` MdadmScan bool `yaml:"mdadm_scan,omitempty"` Script string `yaml:"script,omitempty"` OemFsType string `yaml:"oem_fstype,omitempty"` OemDev string `yaml:"oem_dev,omitempty"` }
Click to show internal directories.
Click to hide internal directories.