unit

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Require the unit be scheduled to a specific machine defined by given boot ID.
	FleetXConditionMachineBootID = "ConditionMachineBootID"
	// Limit eligible machines to the one that hosts a specific unit.
	FleetXConditionMachineOf = "ConditionMachineOf"
	// Prevent a unit from being collocated with other units using glob-matching on the other unit names.
	FleetXConflicts = "Conflicts"
)

Fleet specific unit file requirement keys. "X-" prefix only appears in unit file and dropped in code before value is used.

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemdUnitFile

type SystemdUnitFile struct {
	// Contents represents the parsed unit file.
	// This field must be considered readonly.
	Contents map[string]map[string][]string
	// contains filtered or unexported fields
}

func NewSystemdUnitFile

func NewSystemdUnitFile(raw string) *SystemdUnitFile

func NewSystemdUnitFileFromLegacyContents added in v0.2.0

func NewSystemdUnitFileFromLegacyContents(contents map[string]map[string]string) *SystemdUnitFile

NewSystemdUnitFileFromLegacyContents creates a SystemdUnitFile object from an obsolete unit file datastructure. This should only be used to remain backwards-compatible where necessary.

func (*SystemdUnitFile) Description added in v0.1.3

func (self *SystemdUnitFile) Description() string

Description returns the first Description option found in the [Unit] section. If the option is not defined, an empty string is returned.

func (*SystemdUnitFile) LegacyContents added in v0.2.0

func (self *SystemdUnitFile) LegacyContents() map[string]map[string]string

LegacyContents serializes the contents of a unit file into an obsolete datastructure. This datastructure is lossy and should only be used to remain backwards-compatible where necessary.

func (*SystemdUnitFile) Requirements

func (self *SystemdUnitFile) Requirements() map[string][]string

Requirements returns all relevant options from the [X-Fleet] section of a unit file. Relevant options are identified with a `X-` prefix.

func (*SystemdUnitFile) String

func (self *SystemdUnitFile) String() string

Jump to

Keyboard shortcuts

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