elements

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package elements provides access to the element informations. A single CTRLD can maintain multiple RBFS instances, which are called elements.

Index

Constants

View Source
const (
	ContainerStateInitializing = ContainerState("INITIALIZING")
	ContainerStateStopper      = ContainerState("STOPPED")
	ContainerStateStarting     = ContainerState("STARTING")
	ContainerStateRunning      = ContainerState("RUNNING")
	ContainerStateStopping     = ContainerState("STOPPING")
	ContainerStateAborting     = ContainerState("ABORTING")
	ContainerStateFreezing     = ContainerState("FREEZING")
	ContainerStateFrozen       = ContainerState("FROZEN")
	ConainerStateThawed        = ContainerState("THAWED")

	OperationalStateUp   = OperationalState("UP")
	OperationalStateDown = OperationalState("DOWN")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// ListElements returns all elements managed by the CTRLD instance.
	ListElements(ctx rbfs.RbfsContext) ([]Element, error)
	// GetElement returns the element with the given name managed by the CTRLD instance.
	GetElement(ctx rbfs.RbfsContext, elementName string) (*Element, error)
}

Client provides access to the available elements.

func NewClient

func NewClient(c *http.Client) Client

NewClient creates a new client to query managed elements.

type ContainerState

type ContainerState string

ContainerState describes the operational state of the RBFS linux container.

type Element

type Element struct {
	// ContainerName holds the name of the RBFS linux container.
	ContainerName string `json:"container_name"`
	// Container state holds the operational state of the RBFS linux container.
	ContainerState ContainerState `json:"container_state"`
	// IPAddresses holds the IP addresses associated with the container.
	IPAddresses []net.IP `json:"ip_addresses"`
	// ElementName holds the element name assigned to the RBFS container.
	ElementName string `json:"element_name"`
	// PodName hold the name of the pod the element belongs to.
	PodName string `json:"pod_name"`
	// OperationalState holds the operational state of the RBFS instance.
	OperationalState OperationalState `json:"operational_state"`
	// ZTPEnabled indicates whether RBFS pulls the startup configuration from the ZTP server after each reboot or not.
	ZTPEnabled bool `json:"ztp_enabled"`
}

Element describes a single element, which is managed by CTRLD.

type OperationalState

type OperationalState string

OperationalState describes the state of the RBFS instance (running inside the RBFS linux container)

Jump to

Keyboard shortcuts

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