activity

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowBringUpAndPowerOn

func AllowBringUpAndPowerOn(
	ctx context.Context,
	target common.Target,
) error

AllowBringUpAndPowerOn opens the power-on gate for the target components.

func FirmwareControl

func FirmwareControl(
	ctx context.Context,
	target common.Target,
	info operations.FirmwareControlTaskInfo,
) error

func GetAllActivities

func GetAllActivities() []any

func GetComponentManager

func GetComponentManager(
	typ devicetypes.ComponentType,
) componentmanager.ComponentManager

GetComponentManager returns the component manager for the specified type. Returns nil if the registry is not set or no manager is registered for the type.

func GetPowerStatus

func GetPowerStatus(
	ctx context.Context,
	target common.Target,
) (map[string]operations.PowerStatus, error)

func InjectExpectation

func InjectExpectation(
	ctx context.Context,
	target common.Target,
	info operations.InjectExpectationTaskInfo,
) error

func PowerControl

func PowerControl(
	ctx context.Context,
	target common.Target,
	info operations.PowerControlTaskInfo,
) error

func SetComponentManagerRegistry

func SetComponentManagerRegistry(r *componentmanager.Registry)

SetComponentManagerRegistry sets the component manager registry to use for activities. This must be called before using GetComponentManager.

func SetFirmwareUpdateTimeWindow

func SetFirmwareUpdateTimeWindow(
	ctx context.Context,
	req operations.SetFirmwareUpdateTimeWindowRequest,
) error

SetFirmwareUpdateTimeWindow sets the firmware update time window for the given components.

func SetTaskStatusUpdater

func SetTaskStatusUpdater(updater task.TaskStatusUpdater)

SetTaskStatusUpdater registers the updater used by activities.

func StartFirmwareUpdate

func StartFirmwareUpdate(
	ctx context.Context,
	target common.Target,
	info operations.FirmwareControlTaskInfo,
) error

StartFirmwareUpdate initiates firmware update without waiting for completion. This activity returns immediately after the update request is accepted.

func UpdateTaskStatus

func UpdateTaskStatus(
	ctx context.Context,
	arg *task.TaskStatusUpdate,
) error

UpdateTaskStatus is a Temporal activity that updates task status by ID.

Types

type GetBringUpStateResult

type GetBringUpStateResult struct {
	States map[string]operations.MachineBringUpState
}

GetBringUpStateResult is the result of GetBringUpState.

func GetBringUpState

func GetBringUpState(
	ctx context.Context,
	target common.Target,
) (*GetBringUpStateResult, error)

GetBringUpState returns the bring-up state for target components.

type GetFirmwareUpdateStatusResult

type GetFirmwareUpdateStatusResult struct {
	Statuses map[string]operations.FirmwareUpdateStatus
}

GetFirmwareUpdateStatusResult is the result of GetFirmwareUpdateStatus activity.

func GetFirmwareUpdateStatus

func GetFirmwareUpdateStatus(
	ctx context.Context,
	target common.Target,
) (*GetFirmwareUpdateStatusResult, error)

GetFirmwareUpdateStatus returns the current status of firmware updates. This activity is designed to be called repeatedly in a polling loop.

Jump to

Keyboard shortcuts

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