Documentation
¶
Index ¶
- type BringUpTaskInfo
- func (t *BringUpTaskInfo) CodeString() string
- func (t *BringUpTaskInfo) Description() string
- func (t *BringUpTaskInfo) Marshal() (json.RawMessage, error)
- func (t *BringUpTaskInfo) Type() taskcommon.TaskType
- func (t *BringUpTaskInfo) Unmarshal(data json.RawMessage) error
- func (t *BringUpTaskInfo) Validate() error
- type FirmwareControlTaskInfo
- func (t *FirmwareControlTaskInfo) CodeString() string
- func (t *FirmwareControlTaskInfo) Description() string
- func (t *FirmwareControlTaskInfo) Marshal() (json.RawMessage, error)
- func (t *FirmwareControlTaskInfo) Type() taskcommon.TaskType
- func (t *FirmwareControlTaskInfo) Unmarshal(data json.RawMessage) error
- func (t *FirmwareControlTaskInfo) Validate() error
- type FirmwareOperation
- type FirmwareUpdateState
- type FirmwareUpdateStatus
- type InjectExpectationTaskInfo
- func (t *InjectExpectationTaskInfo) CodeString() string
- func (t *InjectExpectationTaskInfo) Description() string
- func (t *InjectExpectationTaskInfo) Marshal() (json.RawMessage, error)
- func (t *InjectExpectationTaskInfo) Type() taskcommon.TaskType
- func (t *InjectExpectationTaskInfo) Unmarshal(data json.RawMessage) error
- func (t *InjectExpectationTaskInfo) Validate() error
- type MachineBringUpState
- type Operation
- type OperationOptions
- type PowerControlTaskInfo
- func (t *PowerControlTaskInfo) CodeString() string
- func (t *PowerControlTaskInfo) Description() string
- func (t *PowerControlTaskInfo) Marshal() (json.RawMessage, error)
- func (t *PowerControlTaskInfo) Type() taskcommon.TaskType
- func (t *PowerControlTaskInfo) Unmarshal(data json.RawMessage) error
- func (t *PowerControlTaskInfo) Validate() error
- type PowerOperation
- type PowerStatus
- type SetFirmwareUpdateTimeWindowRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BringUpTaskInfo ¶
type BringUpTaskInfo struct{}
func (*BringUpTaskInfo) CodeString ¶
func (t *BringUpTaskInfo) CodeString() string
func (*BringUpTaskInfo) Description ¶
func (t *BringUpTaskInfo) Description() string
func (*BringUpTaskInfo) Marshal ¶
func (t *BringUpTaskInfo) Marshal() (json.RawMessage, error)
func (*BringUpTaskInfo) Type ¶
func (t *BringUpTaskInfo) Type() taskcommon.TaskType
func (*BringUpTaskInfo) Unmarshal ¶
func (t *BringUpTaskInfo) Unmarshal( data json.RawMessage, ) error
func (*BringUpTaskInfo) Validate ¶
func (t *BringUpTaskInfo) Validate() error
type FirmwareControlTaskInfo ¶
type FirmwareControlTaskInfo struct {
Operation FirmwareOperation `json:"operation"`
TargetVersion string `json:"target_version,omitempty"`
StartTime int64 `json:"start_time,omitempty"` // Unix timestamp
EndTime int64 `json:"end_time,omitempty"` // Unix timestamp
}
func (*FirmwareControlTaskInfo) CodeString ¶
func (t *FirmwareControlTaskInfo) CodeString() string
func (*FirmwareControlTaskInfo) Description ¶
func (t *FirmwareControlTaskInfo) Description() string
func (*FirmwareControlTaskInfo) Marshal ¶
func (t *FirmwareControlTaskInfo) Marshal() (json.RawMessage, error)
func (*FirmwareControlTaskInfo) Type ¶
func (t *FirmwareControlTaskInfo) Type() taskcommon.TaskType
func (*FirmwareControlTaskInfo) Unmarshal ¶
func (t *FirmwareControlTaskInfo) Unmarshal(data json.RawMessage) error
func (*FirmwareControlTaskInfo) Validate ¶
func (t *FirmwareControlTaskInfo) Validate() error
type FirmwareOperation ¶
type FirmwareOperation int
const ( FirmwareOperationUnknown FirmwareOperation = iota FirmwareOperationUpgrade FirmwareOperationDowngrade FirmwareOperationRollback FirmwareOperationVersion )
func (FirmwareOperation) CodeString ¶
func (o FirmwareOperation) CodeString() string
CodeString returns the operation code string for a FirmwareOperation
func (FirmwareOperation) String ¶
func (o FirmwareOperation) String() string
type FirmwareUpdateState ¶
type FirmwareUpdateState int
FirmwareUpdateState represents the state of a firmware update operation.
const ( FirmwareUpdateStateUnknown FirmwareUpdateState = 0 FirmwareUpdateStateQueued FirmwareUpdateState = 1 FirmwareUpdateStateVerifying FirmwareUpdateState = 2 FirmwareUpdateStateCompleted FirmwareUpdateState = 3 FirmwareUpdateStateFailed FirmwareUpdateState = 4 )
func (FirmwareUpdateState) IsTerminal ¶
func (s FirmwareUpdateState) IsTerminal() bool
IsTerminal returns true if this state is a terminal state (completed or failed).
func (FirmwareUpdateState) String ¶
func (s FirmwareUpdateState) String() string
type FirmwareUpdateStatus ¶
type FirmwareUpdateStatus struct {
ComponentID string
State FirmwareUpdateState
Error string
}
FirmwareUpdateStatus contains the status of a firmware update operation.
type InjectExpectationTaskInfo ¶
type InjectExpectationTaskInfo struct {
Info json.RawMessage `json:"info"`
}
func (*InjectExpectationTaskInfo) CodeString ¶
func (t *InjectExpectationTaskInfo) CodeString() string
func (*InjectExpectationTaskInfo) Description ¶
func (t *InjectExpectationTaskInfo) Description() string
func (*InjectExpectationTaskInfo) Marshal ¶
func (t *InjectExpectationTaskInfo) Marshal() (json.RawMessage, error)
func (*InjectExpectationTaskInfo) Type ¶
func (t *InjectExpectationTaskInfo) Type() taskcommon.TaskType
func (*InjectExpectationTaskInfo) Unmarshal ¶
func (t *InjectExpectationTaskInfo) Unmarshal(data json.RawMessage) error
func (*InjectExpectationTaskInfo) Validate ¶
func (t *InjectExpectationTaskInfo) Validate() error
type MachineBringUpState ¶
type MachineBringUpState int
MachineBringUpState represents the bring-up state of a machine in relation to the power-on gate.
const ( MachineBringUpStateNotDiscovered MachineBringUpState = iota MachineBringUpStateWaitingForIngestion MachineBringUpStateMachineNotCreated MachineBringUpStateMachineCreated )
func (MachineBringUpState) IsBroughtUp ¶
func (s MachineBringUpState) IsBroughtUp() bool
IsBroughtUp returns true if the machine has passed the gate and been ingested.
func (MachineBringUpState) String ¶
func (s MachineBringUpState) String() string
type Operation ¶
type Operation interface {
Validate() error
Marshal() (json.RawMessage, error)
Unmarshal(data json.RawMessage) error
Type() taskcommon.TaskType
Description() string
CodeString() string // Returns operation code string (e.g., "power_on", "upgrade")
}
func New ¶
func New(typ taskcommon.TaskType, info json.RawMessage) (Operation, error)
type OperationOptions ¶
func GetOperationOptions ¶
func GetOperationOptions(typ taskcommon.TaskType) OperationOptions
type PowerControlTaskInfo ¶
type PowerControlTaskInfo struct {
Operation PowerOperation `json:"operation"`
Forced bool `json:"forced"`
}
func (*PowerControlTaskInfo) CodeString ¶
func (t *PowerControlTaskInfo) CodeString() string
func (*PowerControlTaskInfo) Description ¶
func (t *PowerControlTaskInfo) Description() string
func (*PowerControlTaskInfo) Marshal ¶
func (t *PowerControlTaskInfo) Marshal() (json.RawMessage, error)
func (*PowerControlTaskInfo) Type ¶
func (t *PowerControlTaskInfo) Type() taskcommon.TaskType
func (*PowerControlTaskInfo) Unmarshal ¶
func (t *PowerControlTaskInfo) Unmarshal(data json.RawMessage) error
func (*PowerControlTaskInfo) Validate ¶
func (t *PowerControlTaskInfo) Validate() error
type PowerOperation ¶
type PowerOperation int
const ( PowerOperationUnknown PowerOperation = iota // Power On PowerOperationPowerOn PowerOperationForcePowerOn // Power Off PowerOperationPowerOff PowerOperationForcePowerOff // Restart (OS level) PowerOperationRestart PowerOperationForceRestart // Reset (hardware level) PowerOperationWarmReset PowerOperationColdReset )
func PowerOperationFromString ¶
func PowerOperationFromString(code string) PowerOperation
PowerOperationFromString returns the PowerOperation for a given operation code string (e.g. "power_on", "force_power_off"). Returns PowerOperationUnknown if the code is not recognized.
func (PowerOperation) CodeString ¶
func (o PowerOperation) CodeString() string
CodeString returns the operation code string for a PowerOperation
func (PowerOperation) String ¶
func (o PowerOperation) String() string
type PowerStatus ¶
type PowerStatus string
const ( PowerStatusUnknown PowerStatus = "Unknown" PowerStatusOn PowerStatus = "On" PowerStatusOff PowerStatus = "Off" PowerStatusRebooting PowerStatus = "Rebooting" )
type SetFirmwareUpdateTimeWindowRequest ¶
type SetFirmwareUpdateTimeWindowRequest struct {
ComponentIDs []string
StartTime time.Time
EndTime time.Time
}
SetFirmwareUpdateTimeWindowRequest is the request for setting firmware update time window. ComponentIDs are external IDs that identify the components.