common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpCodePowerControlPowerOn       = "power_on"
	OpCodePowerControlForcePowerOn  = "force_power_on"
	OpCodePowerControlPowerOff      = "power_off"
	OpCodePowerControlForcePowerOff = "force_power_off"
	OpCodePowerControlRestart       = "restart"
	OpCodePowerControlForceRestart  = "force_restart"
	OpCodePowerControlWarmReset     = "warm_reset"
	OpCodePowerControlColdReset     = "cold_reset"
)

Power control operation codes

View Source
const (
	OpCodeFirmwareControlUpgrade   = "upgrade"
	OpCodeFirmwareControlDowngrade = "downgrade"
	OpCodeFirmwareControlRollback  = "rollback"
)

Firmware control operation codes

View Source
const (
	OpCodeBringUp = "bring_up"
	OpCodeIngest  = "ingest"
)

Bring-up operation codes

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentInfo

type ComponentInfo struct {
	Type        devicetypes.ComponentType
	DeviceInfo  deviceinfo.DeviceInfo
	ComponentID string // Component ID from the component manager service
}

func (*ComponentInfo) Validate

func (ci *ComponentInfo) Validate() error

type ExecutorType

type ExecutorType string
const (
	ExecutorTypeUnknown  ExecutorType = "unknown"
	ExecutorTypeTemporal ExecutorType = "temporal"
)

func (ExecutorType) IsValid

func (et ExecutorType) IsValid() bool

type OperationRuleListOptions

type OperationRuleListOptions struct {
	OperationType TaskType
	IsDefault     *bool
}

type TaskListOptions

type TaskListOptions struct {
	TaskType   TaskType
	RackID     uuid.UUID
	ActiveOnly bool
}

type TaskStatus

type TaskStatus string
const (
	TaskStatusUnknown    TaskStatus = "unknown"
	TaskStatusPending    TaskStatus = "pending"
	TaskStatusRunning    TaskStatus = "running"
	TaskStatusCompleted  TaskStatus = "completed"
	TaskStatusFailed     TaskStatus = "failed"
	TaskStatusTerminated TaskStatus = "terminated"
	// TaskStatusWaiting means the task was queued due to a conflict and is
	// waiting for the rack to become available. It is NOT a finished state.
	TaskStatusWaiting TaskStatus = "waiting"
)

func (TaskStatus) IsFinished

func (s TaskStatus) IsFinished() bool

type TaskType

type TaskType string
const (
	TaskTypeUnknown           TaskType = "unknown"
	TaskTypeInjectExpectation TaskType = "inject_expectation"
	TaskTypePowerControl      TaskType = "power_control"
	TaskTypeFirmwareControl   TaskType = "firmware_control"
	TaskTypeBringUp           TaskType = "bring_up"
)

func TaskTypeFromString

func TaskTypeFromString(s string) TaskType

func (TaskType) IsValid

func (tt TaskType) IsValid() bool

func (TaskType) String

func (tt TaskType) String() string

Jump to

Keyboard shortcuts

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