machine

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MPL-2.0 Imports: 2 Imported by: 10

Documentation

Overview

Package machine defines common machine type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int

Type represents a machine type.

const (
	// TypeUnknown represents undefined node type, when there is no machine configuration yet.
	TypeUnknown Type = iota // unknown

	// TypeInit type designates the first control plane node to come up. You can think of it like a bootstrap node.
	// This node will perform the initial steps to bootstrap the cluster -- generation of TLS assets, starting of the control plane, etc.
	TypeInit // init

	// TypeControlPlane designates the node as a control plane member.
	// This means it will host etcd along with the Kubernetes controlplane components such as API Server, Controller Manager, Scheduler.
	TypeControlPlane // controlplane

	// TypeWorker designates the node as a worker node.
	// This means it will be an available compute node for scheduling workloads.
	TypeWorker // worker
)

func ParseType

func ParseType(s string) (Type, error)

ParseType parses string constant as Type.

func (Type) IsControlPlane

func (t Type) IsControlPlane() bool

IsControlPlane returns true if the type is a control plane node.

func (Type) MarshalText

func (t Type) MarshalText() (text []byte, err error)

MarshalText implements encoding.TextMarshaler.

func (Type) String

func (i Type) String() string

func (*Type) UnmarshalText

func (t *Type) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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