activity

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BringUpControl added in v1.2.0

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

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

func FirmwareControl

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

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

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 SetTaskStatusUpdater

func SetTaskStatusUpdater(updater task.TaskStatusUpdater)

SetTaskStatusUpdater registers the updater used by activities.

func UpdateTaskStatus

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

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

Types

type GetBringUpStatusResult added in v1.2.0

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

GetBringUpStatusResult is the result of GetBringUpStatus activity.

func GetBringUpStatus added in v1.2.0

func GetBringUpStatus(
	ctx context.Context,
	target common.Target,
) (*GetBringUpStatusResult, error)

GetBringUpStatus returns the bring-up state for target components.

type GetFirmwareStatusResult added in v1.2.0

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

GetFirmwareStatusResult is the result of GetFirmwareStatus activity.

func GetFirmwareStatus added in v1.2.0

func GetFirmwareStatus(
	ctx context.Context,
	target common.Target,
) (*GetFirmwareStatusResult, error)

GetFirmwareStatus 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