instance

package
v0.0.0-...-ad3a29e Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByRefs

func FilterByRefs(instances []linodego.Instance, refs resourceref.List) (r []linodego.Instance)

FilterByRefs filters for the referenced Linode Instances.

func FilterLKECluster

func FilterLKECluster(ctx context.Context, client linode.Client, id int, instances []linodego.Instance) ([]linodego.Instance, error)

FilterLKECluster filters for LKE Cluster Pool Nodes a slice of linodego.Instance, a client and an LKE Cluster ID.

Types

type FilterFlags

type FilterFlags struct {
	// contains filtered or unexported fields
}

func (*FilterFlags) AddFlags

func (f *FilterFlags) AddFlags(c *cobra.Command)

AddFlags recieves a *cobra.Command reference and binds a flag for specifying a preset.

func (*FilterFlags) Filter

func (f *FilterFlags) Filter(label string) *linodego.Filter

func (*FilterFlags) LKECluster

func (f *FilterFlags) LKECluster() int

type List

type List struct {
	// contains filtered or unexported fields
}

func NewList

func NewList(instances []linodego.Instance) List

func (List) Items

func (l List) Items() []resource.Resource

func (List) Meta

func (l List) Meta() resource.Meta

type Meta

type Meta struct{}

func (Meta) DefaultColumns

func (Meta) DefaultColumns() []string

func (Meta) Name

func (Meta) Name() string

func (Meta) RequiredColumns

func (Meta) RequiredColumns() []string

type Resource

type Resource linodego.Instance

func (Resource) Properties

func (r Resource) Properties() resource.PropertyMap

type Spec

type Spec struct {
	ID              int                      `yaml:"id"`
	Created         *time.Time               `yaml:"created"`
	Updated         *time.Time               `yaml:"updated"`
	Region          string                   `yaml:"region"`
	Alerts          *linodego.InstanceAlert  `yaml:"alerts"`
	Backups         *linodego.InstanceBackup `yaml:"backups"`
	Image           string                   `yaml:"image"`
	Group           string                   `yaml:"group"`
	IPv4            []*net.IP                `yaml:"ipv4"`
	IPv6            string                   `yaml:"ipv6"`
	Label           string                   `yaml:"label"`
	Type            string                   `yaml:"type"`
	Status          linodego.InstanceStatus  `yaml:"status"`
	Hypervisor      string                   `yaml:"hypervisor"`
	Specs           *linodego.InstanceSpec   `yaml:"specs"`
	WatchdogEnabled bool                     `yaml:"watchdogEnabled"`
	Tags            []string                 `yaml:"tags"`
}

func SpecFromObject

func SpecFromObject(instance *linodego.Instance) *Spec

func (*Spec) Diff

func (s *Spec) Diff(in *Spec) (*linodego.InstanceUpdateOptions, error)

Jump to

Keyboard shortcuts

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