os

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

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.RenderedDeviceSpec) error
	AfterUpdate(ctx context.Context, desired *v1alpha1.RenderedDeviceSpec) error
	Reboot(ctx context.Context, desired *v1alpha1.RenderedDeviceSpec) error
	status.Exporter
}

func NewManager

func NewManager(log *log.PrefixLogger, client Client, 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.RenderedDeviceSpec) error

AfterUpdate mocks base method.

func (*MockManager) BeforeUpdate

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

BeforeUpdate 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.RenderedDeviceSpec) error

Reboot mocks base method.

func (*MockManager) Status

func (m *MockManager) Status(arg0 context.Context, arg1 *v1alpha1.DeviceStatus) 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) 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) *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