conf

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

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

Conf is a configuration for a Container Linux machine. It may be either a coreos-cloudconfig or an ignition configuration.

func (*Conf) AddSystemdUnit added in v0.7.0

func (c *Conf) AddSystemdUnit(name, contents string, enable bool)

func (*Conf) AddSystemdUnitDropin added in v0.8.0

func (c *Conf) AddSystemdUnitDropin(service, name, contents string)

func (*Conf) Bytes added in v0.3.0

func (c *Conf) Bytes() []byte

Bytes returns the serialized userdata in Conf.

func (*Conf) CopyKeys

func (c *Conf) CopyKeys(keys []*agent.Key)

CopyKeys copies public keys from agent ag into the configuration to the appropriate configuration section for the core user.

func (*Conf) IsEmpty added in v0.8.0

func (c *Conf) IsEmpty() bool

func (*Conf) IsIgnition added in v0.3.0

func (c *Conf) IsIgnition() bool

IsIgnition returns true if the config is for Ignition. Returns false in the case of empty configs as on most platforms, this will default back to cloudconfig

func (*Conf) String

func (c *Conf) String() string

String returns the string representation of the userdata in Conf.

func (*Conf) WriteFile added in v0.3.0

func (c *Conf) WriteFile(name string) error

WriteFile writes the userdata in Conf to a local file.

type UserData added in v0.6.0

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

UserData is an immutable, unvalidated configuration for a Container Linux machine.

func CloudConfig added in v0.6.0

func CloudConfig(data string) *UserData

func ContainerLinuxConfig added in v0.6.0

func ContainerLinuxConfig(data string) *UserData

func Empty added in v0.6.0

func Empty() *UserData

func Ignition added in v0.6.0

func Ignition(data string) *UserData

func Script added in v0.6.0

func Script(data string) *UserData

func Unknown added in v0.6.0

func Unknown(data string) *UserData

func (*UserData) AddKey added in v0.8.0

func (u *UserData) AddKey(key agent.Key) *UserData

Adds an SSH key and returns a new UserData.

func (*UserData) Contains added in v0.8.0

func (u *UserData) Contains(substr string) bool

Contains returns true if the UserData contains the specified string.

func (*UserData) IsIgnitionCompatible added in v0.8.0

func (u *UserData) IsIgnitionCompatible() bool

func (*UserData) Render added in v0.6.0

func (u *UserData) Render(ctPlatform string) (*Conf, error)

Render parses userdata and returns a new Conf. It returns an error if the userdata can't be parsed.

func (*UserData) Subst added in v0.6.0

func (u *UserData) Subst(old, new string) *UserData

Performs a string substitution and returns a new UserData.

Jump to

Keyboard shortcuts

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