lifecycle

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 27 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

Overview

Package lifecycle is a generated GoMock package.

Index

Constants

View Source
const (
	// agent banner file
	BannerFile = "/etc/issue.d/flightctl-banner.issue"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Initializer

type Initializer interface {
	// Initialize ensures that the lifecycle manager is initialized.
	Initialize(ctx context.Context, status *v1beta1.DeviceStatus) error
	// IsInitialized returns true if the lifecycle manager has been initialized.
	IsInitialized() bool
}

type LifecycleManager

type LifecycleManager struct {
	// contains filtered or unexported fields
}

LifecycleManager struct needs to hold a reference to the management config

func NewManager

func NewManager(
	deviceName string,
	enrollmentUIEndpoint string,
	managementCertPath string,
	managementKeyPath string,
	dataDir string,
	deviceReadWriter fileio.ReadWriter,
	enrollmentClient client.Enrollment,
	enrollmentCSR []byte,
	defaultLabels map[string]string,
	labelFromSystemInfo map[string]string,
	caps deviceos.Capabilities,
	statusManager status.Manager,
	systemdClient *client.Systemd,
	identityProvider identity.Provider,
	hookManager hook.Manager,
	preEnrollmentFailurePolicy string,
	backoff wait.Backoff,
	log *log.PrefixLogger,
) *LifecycleManager

NewManager creates a LifecycleManager responsible for device enrollment.

func (*LifecycleManager) AfterUpdate

func (m *LifecycleManager) AfterUpdate(ctx context.Context, current, desired *v1beta1.DeviceSpec) error

func (*LifecycleManager) Initialize

func (m *LifecycleManager) Initialize(ctx context.Context, status *v1beta1.DeviceStatus) error

Initialize ensures the device is enrolled to the management service.

func (*LifecycleManager) IsInitialized

func (m *LifecycleManager) IsInitialized() bool

func (*LifecycleManager) Sync

func (m *LifecycleManager) Sync(ctx context.Context, current, desired *v1beta1.DeviceSpec) error

type Manager

type Manager interface {
	Sync(ctx context.Context, current, desired *v1beta1.DeviceSpec) error
	AfterUpdate(ctx context.Context, current, desired *v1beta1.DeviceSpec) error
}

type MockInitializer

type MockInitializer struct {
	// contains filtered or unexported fields
}

MockInitializer is a mock of Initializer interface.

func NewMockInitializer

func NewMockInitializer(ctrl *gomock.Controller) *MockInitializer

NewMockInitializer creates a new mock instance.

func (*MockInitializer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInitializer) Initialize

func (m *MockInitializer) Initialize(ctx context.Context, status *v1beta1.DeviceStatus) error

Initialize mocks base method.

func (*MockInitializer) IsInitialized

func (m *MockInitializer) IsInitialized() bool

IsInitialized mocks base method.

type MockInitializerMockRecorder

type MockInitializerMockRecorder struct {
	// contains filtered or unexported fields
}

MockInitializerMockRecorder is the mock recorder for MockInitializer.

func (*MockInitializerMockRecorder) Initialize

func (mr *MockInitializerMockRecorder) Initialize(ctx, status any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockInitializerMockRecorder) IsInitialized

func (mr *MockInitializerMockRecorder) IsInitialized() *gomock.Call

IsInitialized indicates an expected call of IsInitialized.

type MockManager

type MockManager struct {
	// contains filtered or unexported fields
}

MockManager is a mock of Manager interface.

func NewMockManager

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) AfterUpdate

func (m *MockManager) AfterUpdate(ctx context.Context, current, desired *v1beta1.DeviceSpec) error

AfterUpdate mocks base method.

func (*MockManager) EXPECT

func (m *MockManager) EXPECT() *MockManagerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockManager) Sync

func (m *MockManager) Sync(ctx context.Context, current, desired *v1beta1.DeviceSpec) error

Sync mocks base method.

type MockManagerMockRecorder

type MockManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) AfterUpdate

func (mr *MockManagerMockRecorder) AfterUpdate(ctx, current, desired any) *gomock.Call

AfterUpdate indicates an expected call of AfterUpdate.

func (*MockManagerMockRecorder) Sync

func (mr *MockManagerMockRecorder) Sync(ctx, current, desired any) *gomock.Call

Sync indicates an expected call of Sync.

Jump to

Keyboard shortcuts

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