Documentation
¶
Index ¶
- Constants
- Variables
- func DummyMarshall(value string) interface{}
- func Dump(private, full bool) (string, error)
- func FilterGlobalConfig(input []string) []string
- func RunInitFuncs(cfg *CloudConfig, initFuncs []InitFunc) error
- type CloudConfig
- func (c *CloudConfig) Get(key string) (interface{}, error)
- func (c *CloudConfig) Import(bytes []byte) error
- func (c *CloudConfig) Merge(bytes []byte) error
- func (c *CloudConfig) Reload() error
- func (c *CloudConfig) Set(key string, value interface{}) error
- func (c *CloudConfig) SetConfig(newConfig *CloudConfig) error
- type CloudInit
- type ContainerConfig
- type DockerConfig
- type InitFunc
- type RancherConfig
- type Repositories
- type Repository
- type SshConfig
- type StateConfig
- type UpgradeConfig
Constants ¶
View Source
const ( DOCKER_BIN = "/usr/bin/docker" 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" SYSTEM = "system" OsConfigFile = "/usr/share/ros/os-config.yml" CloudConfigFile = "/var/lib/rancher/conf/cloud-config.yml" CloudConfigScriptFile = "/var/lib/rancher/conf/cloud-config-script" MetaDataFile = "/var/lib/rancher/conf/metadata" LocalConfigFile = "/var/lib/rancher/conf/cloud-config-local.yml" PrivateConfigFile = "/var/lib/rancher/conf/cloud-config-private.yml" )
Variables ¶
View Source
var (
VERSION string
)
Functions ¶
func DummyMarshall ¶
func DummyMarshall(value string) interface{}
func FilterGlobalConfig ¶
func RunInitFuncs ¶
func RunInitFuncs(cfg *CloudConfig, initFuncs []InitFunc) error
Types ¶
type CloudConfig ¶
type CloudConfig struct {
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
WriteFiles []config.File `yaml:"write_files"`
Hostname string `yaml:"hostname"`
Rancher RancherConfig `yaml:"rancher,omitempty"`
}
func LoadConfig ¶
func LoadConfig() (*CloudConfig, error)
func NewConfig ¶
func NewConfig() *CloudConfig
func ReadConfig ¶ added in v0.3.2
func ReadConfig(bytes []byte, files ...string) *CloudConfig
func (*CloudConfig) Get ¶
func (c *CloudConfig) Get(key string) (interface{}, error)
func (*CloudConfig) Import ¶
func (c *CloudConfig) Import(bytes []byte) error
func (*CloudConfig) Merge ¶
func (c *CloudConfig) Merge(bytes []byte) error
func (*CloudConfig) Reload ¶
func (c *CloudConfig) Reload() error
func (*CloudConfig) Set ¶
func (c *CloudConfig) Set(key string, value interface{}) error
func (*CloudConfig) SetConfig ¶
func (c *CloudConfig) SetConfig(newConfig *CloudConfig) error
This function only sets "non-empty" values
type ContainerConfig ¶
type ContainerConfig struct {
Id string `yaml:"id,omitempty"`
Cmd string `yaml:"run,omitempty"`
MigrateVolumes bool `yaml:"migrate_volumes,omitempty"`
ReloadConfig bool `yaml:"reload_config,omitempty"`
CreateOnly bool `yaml:create_only,omitempty`
Service *project.ServiceConfig `yaml:service,omitempty`
}
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"`
}
type InitFunc ¶
type InitFunc func(*CloudConfig) error
type RancherConfig ¶
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"`
Log bool `yaml:"log,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"`
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"`
UserDocker DockerConfig `yaml:"user_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 Repository ¶ added in v0.3.0
type Repository struct {
Url string `yaml:url,omitempty`
}
type StateConfig ¶ added in v0.2.0
type UpgradeConfig ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.