config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 17 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpEnv

func DumpEnv(c *virtlet_v1.VirtletConfig) string

DumpEnv returns a string with environment variable settings corresponding to the VirtletConfig.

func GenerateDoc

func GenerateDoc() string

GenerateDoc generates a markdown document with a table describing all the configuration settings.

func GetCRDDefinitions

func GetCRDDefinitions() []runtime.Object

GetCRDDefinitions returns custom resource definitions for VirtletImageMapping kind in k8s.

func GetDefaultConfig

func GetDefaultConfig() *virtlet_v1.VirtletConfig

GetDefaultConfig returns a VirtletConfig with all values set to default

func MergeConfigs

func MergeConfigs(configs []*virtlet_v1.VirtletConfig) *virtlet_v1.VirtletConfig

MergeConfigs merges several Virtlet configs together, with configs going later taking precedence.

func Override

func Override(target, other *virtlet_v1.VirtletConfig)

Override replaces the values in the target config with those which are set in the other config.

Types

type Binder

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

Binder is used to extract Virtlet config from a FlagSet.

func NewBinder

func NewBinder(flagSet *flag.FlagSet) *Binder

NewBinder returns a new Binder.

func (*Binder) GetConfig

func (b *Binder) GetConfig() *virtlet_v1.VirtletConfig

GetConfig returns the config that only includes the fields that were explicitly set in the flags. It should be called after parsing the flags.

type NodeConfig

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

NodeConfig is used to retrieve Virtlet configuration for the current node.

func NewNodeConfig

func NewNodeConfig(clientCfg clientcmd.ClientConfig) *NodeConfig

NewNodeConfig creates a new NodeConfig

func (*NodeConfig) LoadConfig

func (nc *NodeConfig) LoadConfig(localConfig *virtlet_v1.VirtletConfig, nodeName string) (*virtlet_v1.VirtletConfig, error)

LoadConfig loads the configuration for the specified node.

Jump to

Keyboard shortcuts

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