os

package
v0.9.4 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: 13 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 os is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Status retrieves the current OS status
	Status(ctx context.Context) (*Status, error)
	// Switch prepares the system to switch to the specified OS image
	Switch(ctx context.Context, image string) error
	// Apply applies the OS changes, potentially triggering a reboot
	Apply(ctx context.Context) error
}

func NewClient

func NewClient(log *log.PrefixLogger, exec executer.Executer) Client

type Manager

type Manager interface {
	BeforeUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
	AfterUpdate(ctx context.Context, desired *v1alpha1.DeviceSpec) error
	Reboot(ctx context.Context, desired *v1alpha1.DeviceSpec) error

	dependency.OCICollector
	status.Exporter
}

func NewManager

func NewManager(
	log *log.PrefixLogger,
	client Client,
	readWriter fileio.ReadWriter,
	podmanClient *client.Podman,
) Manager

NewManager creates a new OS manager

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) Apply

func (m *MockClient) Apply(ctx context.Context) error

Apply mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

func (*MockClient) Status

func (m *MockClient) Status(ctx context.Context) (*Status, error)

Status mocks base method.

func (*MockClient) Switch

func (m *MockClient) Switch(ctx context.Context, image string) error

Switch mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) Apply

func (mr *MockClientMockRecorder) Apply(ctx any) *gomock.Call

Apply indicates an expected call of Apply.

func (*MockClientMockRecorder) Status

func (mr *MockClientMockRecorder) Status(ctx any) *gomock.Call

Status indicates an expected call of Status.

func (*MockClientMockRecorder) Switch

func (mr *MockClientMockRecorder) Switch(ctx, image any) *gomock.Call

Switch indicates an expected call of Switch.

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, desired *v1alpha1.DeviceSpec) error

AfterUpdate mocks base method.

func (*MockManager) BeforeUpdate

func (m *MockManager) BeforeUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error

BeforeUpdate mocks base method.

func (*MockManager) CollectOCITargets added in v0.9.0

func (m *MockManager) CollectOCITargets(ctx context.Context, current, desired *v1alpha1.DeviceSpec) ([]dependency.OCIPullTarget, error)

CollectOCITargets 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) Reboot

func (m *MockManager) Reboot(ctx context.Context, desired *v1alpha1.DeviceSpec) error

Reboot mocks base method.

func (*MockManager) Status

func (m *MockManager) Status(arg0 context.Context, arg1 *v1alpha1.DeviceStatus, arg2 ...status.CollectorOpt) error

Status 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, desired any) *gomock.Call

AfterUpdate indicates an expected call of AfterUpdate.

func (*MockManagerMockRecorder) BeforeUpdate

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

BeforeUpdate indicates an expected call of BeforeUpdate.

func (*MockManagerMockRecorder) CollectOCITargets added in v0.9.0

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

CollectOCITargets indicates an expected call of CollectOCITargets.

func (*MockManagerMockRecorder) Reboot

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

Reboot indicates an expected call of Reboot.

func (*MockManagerMockRecorder) Status

func (mr *MockManagerMockRecorder) Status(arg0, arg1 any, arg2 ...any) *gomock.Call

Status indicates an expected call of Status.

type Status

type Status struct {
	container.BootcHost
}

Jump to

Keyboard shortcuts

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