node

package
v0.0.0-...-f59c3e7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = config.Schema{

	"core.https_address": {},

	"core.https_allowed_headers":     {},
	"core.https_allowed_methods":     {},
	"core.https_allowed_origin":      {},
	"core.https_allowed_credentials": {},
	"core.proxy_http":                {},
	"core.proxy_https":               {},
	"core.proxy_ignore_hosts":        {},
	"core.trust_password":            {},
	"images.auto_update_cached":      {},
	"images.auto_update_interval":    {},
	"images.compression_algorithm":   {},
	"images.remote_cache_expiry":     {},
	"maas.api.key":                   {},
	"maas.api.url":                   {},
	"maas.machine":                   {},
	"storage.lvm_fstype":             {},
	"storage.lvm_mount_options":      {},
	"storage.lvm_thinpool_name":      {},
	"storage.lvm_vg_name":            {},
	"storage.lvm_volume_size":        {},
	"storage.zfs_pool_name":          {},
	"storage.zfs_remove_snapshots":   {},
	"storage.zfs_use_refquota":       {},
}

ConfigSchema defines available server configuration keys.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config holds node-local configuration values for a certain LXD instance.

func ConfigLoad

func ConfigLoad(tx *db.NodeTx, triggers ...config.Trigger) (*Config, error)

ConfigLoad loads a new Config object with the current node-local configuration values fetched from the database. An optional list of config value triggers can be passed, each config key must have at most one trigger.

func (*Config) Dump

func (c *Config) Dump() map[string]interface{}

Dump current configuration keys and their values. Keys with values matching their defaults are omitted.

func (*Config) HTTPSAddress

func (c *Config) HTTPSAddress() string

HTTPSAddress returns the address and port this LXD node should expose its API to, if any.

func (*Config) Patch

func (c *Config) Patch(patch map[string]interface{}) error

Patch changes only the configuration keys in the given map.

func (*Config) Replace

func (c *Config) Replace(values map[string]interface{}) error

Replace the current configuration with the given values.

Jump to

Keyboard shortcuts

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