device_selection

package
v0.9.4-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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