device_selection

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RolloutDeviceSelectionInterval = 30 * time.Second
	DefaultSuccessThreshold        = 90
	DefaultUpdateTimeout           = 24 * time.Hour
)
View Source
const DeviceSelectionTaskName = "rollout-device-selection"

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler interface {
	Reconcile(ctx context.Context)
}

func NewReconciler

func NewReconciler(serviceHandler service.Service, callbackManager tasks_client.CallbackManager, log logrus.FieldLogger) Reconciler

type RolloutDeviceSelector

type RolloutDeviceSelector interface {
	HasMoreSelections(ctx context.Context) (bool, error)
	CurrentSelection(ctx context.Context) (Selection, error)
	Advance(ctx context.Context) error
	Reset(ctx context.Context) error
	IsRolloutNew() bool
	IsDefinitionUpdated() (bool, error)
	OnNewRollout(ctx context.Context) error
	UnmarkRolloutSelection(ctx context.Context) error
}

func NewRolloutDeviceSelector

func NewRolloutDeviceSelector(deviceSelection *api.RolloutDeviceSelection, defaultUpdateTimeoutStr *api.Duration, serviceHandler service.Service, orgId uuid.UUID, fleet *api.Fleet, templateVersionName string, log logrus.FieldLogger) (RolloutDeviceSelector, error)

type Selection

type Selection interface {
	Devices(ctx context.Context) (*api.DeviceList, error)
	Approve(ctx context.Context) error
	IsApproved() bool
	IsRolledOut(ctx context.Context) (bool, error)
	MayApproveAutomatically() (bool, error)
	IsComplete(ctx context.Context) (bool, error)
	SetCompletionReport(ctx context.Context) error
	OnRollout(ctx context.Context) error
	OnSuspended(ctx context.Context) error
	OnFinish(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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