common

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalYAML

func MarshalYAML(sth interface{}) []byte

func PackageEquals added in v0.22.0

func PackageEquals(this, that Package) bool

Types

type Allowed

type Allowed struct {
	Port     string
	Protocol string
}

type CurrentNodeAgents added in v0.23.0

type CurrentNodeAgents struct {
	// NA is exported for yaml (de)serialization and not intended to be accessed by any other code outside this package
	NA map[string]*NodeAgentCurrent `yaml:",inline"`
	// contains filtered or unexported fields
}

func (*CurrentNodeAgents) Get added in v0.23.0

func (*CurrentNodeAgents) Set added in v0.23.0

func (n *CurrentNodeAgents) Set(id string, na *NodeAgentCurrent)

type DesiredNodeAgents added in v0.23.0

type DesiredNodeAgents struct {
	// NA is exported for yaml (de)serialization and not intended to be accessed by any other code outside this package
	NA map[string]*NodeAgentSpec `yaml:",inline"`
	// contains filtered or unexported fields
}

func (*DesiredNodeAgents) Delete added in v0.23.0

func (n *DesiredNodeAgents) Delete(id string)

func (*DesiredNodeAgents) Get added in v0.23.0

func (n *DesiredNodeAgents) Get(id string) (*NodeAgentSpec, bool)

type Firewall

type Firewall struct {
	FW map[string]*Allowed `yaml:",inline"`
	// contains filtered or unexported fields
}

func ToFirewall added in v0.23.0

func ToFirewall(fw map[string]*Allowed) Firewall

func (Firewall) Contains

func (f Firewall) Contains(other Firewall) bool

func (Firewall) IsContainedIn

func (f Firewall) IsContainedIn(ports []*Allowed) bool

func (*Firewall) Merge

func (f *Firewall) Merge(fw Firewall)

func (*Firewall) Ports

func (f *Firewall) Ports() Ports

type NodeAgentCurrent

type NodeAgentCurrent struct {
	NodeIsReady bool `mapstructure:"ready" yaml:"ready"`
	Software    Software
	Open        []*Allowed
	Commit      string
	Booted      time.Time
}

type NodeAgentSpec

type NodeAgentSpec struct {
	ChangesAllowed bool
	//	RebootEnabled  bool
	Software       *Software
	Firewall       *Firewall
	RebootRequired time.Time
}

type NodeAgentsCurrentKind

type NodeAgentsCurrentKind struct {
	Kind    string
	Version string
	Current CurrentNodeAgents
}

type NodeAgentsDesiredKind

type NodeAgentsDesiredKind struct {
	Kind    string
	Version string
	Spec    NodeAgentsSpec `yaml:",omitempty"`
}

type NodeAgentsSpec

type NodeAgentsSpec struct {
	Commit     string
	NodeAgents DesiredNodeAgents
}

type Package

type Package struct {
	Version string            `yaml:",omitempty"`
	Config  map[string]string `yaml:",omitempty"`
}

func (Package) Equals

func (p Package) Equals(other Package) bool

type Ports added in v0.23.0

type Ports []*Allowed

func (Ports) String added in v0.23.0

func (p Ports) String() string

type Software

type Software struct {
	Swap             Package `yaml:",omitempty"`
	Kubelet          Package `yaml:",omitempty"`
	Kubeadm          Package `yaml:",omitempty"`
	Kubectl          Package `yaml:",omitempty"`
	Containerruntime Package `yaml:",omitempty"`
	KeepaliveD       Package `yaml:",omitempty"`
	Nginx            Package `yaml:",omitempty"`
	SSHD             Package `yaml:",omitempty"`
	Hostname         Package `yaml:",omitempty"`
	Sysctl           Package `yaml:",omitempty"`
	Health           Package `yaml:",omitempty"`
}

func (*Software) Merge

func (s *Software) Merge(sw Software)

Jump to

Keyboard shortcuts

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