fields

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterName

type ClusterName string

Cluster name is where the DaemonSet lives on

func (ClusterName) String

func (cn ClusterName) String() string

type DaemonSet

type DaemonSet struct {
	// UUID for this DaemonSet
	ID ID

	// When disabled, this DaemonSet will not make any scheduling changes
	Disabled bool

	// The pod manifest that should be scheduled on nodes
	Manifest manifest.Manifest

	// Minimum health for nodes when scheduling
	MinHealth int

	// DaemonSet's environment name
	Name ClusterName

	// Defines the set of nodes on which the manifest can be scheduled
	NodeSelector labels.Selector

	// PodID to deploy
	PodID types.PodID

	Timeout time.Duration
}

DaemonSet holds the runtime state of a Daemon Set as saved in Consul.

func (DaemonSet) MarshalJSON

func (ds DaemonSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for serializing the DS to JSON format. Lets json interface know how to marshal a DaemonSet Can be called using json.Marshal

func (*DaemonSet) ToRaw

func (ds *DaemonSet) ToRaw() (RawDaemonSet, error)

Converts a pod cluster to a type that will marshal cleanly to JSON.

func (*DaemonSet) UnmarshalJSON

func (ds *DaemonSet) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for deserializing the JSON representation of an DS. Lets json interface know how to unmarshal a DaemonSet Can be called using json.Unmarshal

type ID

type ID string

ID is a named type alias for DaemonSet IDs

func ToDaemonSetID

func ToDaemonSetID(id string) (ID, error)

func (ID) String

func (id ID) String() string

type RawDaemonSet

type RawDaemonSet struct {
	ID           ID            `json:"id"`
	Disabled     bool          `json:"disabled"`
	Manifest     string        `json:"manifest"`
	MinHealth    int           `json:"min_health"`
	Name         ClusterName   `json:"cluster_name"`
	NodeSelector string        `json:"node_selector"`
	PodID        types.PodID   `json:"pod_id"`
	Timeout      time.Duration `json:"timeout"`
}

RawDaemonSet defines the JSON format used to store data into Consul

Jump to

Keyboard shortcuts

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