node

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownSize = errors.New("unknown size")
)
View Source
var (
	ErrUnknownStatus = errors.New("unknown status")
)

Functions

This section is empty.

Types

type Identifier

type Identifier string

func FormNewNodeIdentifier

func FormNewNodeIdentifier() Identifier

func IdentifierFromString

func IdentifierFromString(id string) (Identifier, error)

func (Identifier) String

func (i Identifier) String() string

type Node

type Node struct {
	// The internal identifier of the node.
	Identifier Identifier
	// The platform identifier of the node.
	PlatformIdentifier PlatformIdentifier
	// The provider the node belong to.
	Provider provider.Identifier
	// The tailnet the node belongs to.
	Tailnet tailnet.Identifier
	// The name of the node on the tailnet
	TailnetName tailnet.DeviceName
	// The id of the node on the tailnet
	TailnetIdentifier tailnet.DeviceIdentifier
	// The location the node is in
	Location provider.Location
	// The preauthkey used to create the node
	PreauthKey tailnet.PreauthKey
	// if the node will be deleted when stopped
	Ephemeral bool
	// the size of the node
	Size      Size
	CreatedAt time.Time
	UpdatedAt time.Time
}

type PlatformIdentifier

type PlatformIdentifier string

func NewPlatformIdentifier

func NewPlatformIdentifier(id string) PlatformIdentifier

func PlatformIdentifierFromString

func PlatformIdentifierFromString(id string) (PlatformIdentifier, error)

func (PlatformIdentifier) String

func (i PlatformIdentifier) String() string

type Size added in v0.0.11

type Size int
const (
	SizeUnknown Size = iota
	SizeSmall
	SizeMedium
	SizeLarge
)

func SizeFromString added in v0.0.11

func SizeFromString(s string) (Size, error)

func (Size) String added in v0.0.11

func (s Size) String() string

type Status

type Status int
const (
	StatusUnknown Status = iota
	StatusRunning
	StatusStarting
	StatusStopping
	StatusStopped
)

func StatusFromString

func StatusFromString(s string) (Status, error)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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