device

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RebootingReason           = "Rebooting"
	OsImageDegradedReason     = "OSImageControllerDegraded"
	BootedWithUnexpectedImage = "BootedWithUnexpectedImage"
)

Variables

View Source
var (
	ErrEnrollmentRequestFailed = fmt.Errorf("enrollment request failed")
	ErrEnrollmentRequestDenied = fmt.Errorf("enrollment request denied")
)

Functions

func SdNotify

func SdNotify(state string) error

Types

type Agent

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

Agent is responsible for managing the applications, configuration and status of the device.

func NewAgent

func NewAgent(
	name string,
	deviceWriter fileio.Writer,
	statusManager status.Manager,
	specManager spec.Manager,
	fetchSpecInterval util.Duration,
	fetchStatusInterval util.Duration,
	hookManager hook.Manager,
	configController *config.Controller,
	osImageController *OSImageController,
	resourceController *resource.Controller,
	consoleController *ConsoleController,
	log *log.PrefixLogger,
) *Agent

NewAgent creates a new device agent.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run starts the device agent reconciliation loop.

type Bootstrap

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

func NewBootstrap

func NewBootstrap(
	deviceName string,
	executer executer.Executer,
	deviceReadWriter fileio.ReadWriter,
	enrollmentCSR []byte,
	specManager spec.Manager,
	statusManager status.Manager,
	enrollmentClient client.Enrollment,
	enrollmentUIEndpoint string,
	managementServiceConfig *client.Config,
	backoff wait.Backoff,
	log *log.PrefixLogger,
	defaultLabels map[string]string,
) *Bootstrap

func (*Bootstrap) Initialize

func (b *Bootstrap) Initialize(ctx context.Context) error

type ConsoleController

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

func NewConsoleController

func NewConsoleController(grpcClient grpc_v1.RouterServiceClient, deviceName string, log *log.PrefixLogger) *ConsoleController

func (*ConsoleController) Sync

type OSImageController

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

func NewOSImageController

func NewOSImageController(
	executer executer.Executer,
	statusManager status.Manager,
	specManager spec.Manager,
	log *log.PrefixLogger,
) *OSImageController

func (*OSImageController) Sync

Directories

Path Synopsis
Package fileio is a generated GoMock package.
Package fileio is a generated GoMock package.
Package hook is a generated GoMock package.
Package hook is a generated GoMock package.
Package resource is a generated GoMock package.
Package resource is a generated GoMock package.
Package spec is a generated GoMock package.
Package spec is a generated GoMock package.
Package status is a generated GoMock package.
Package status is a generated GoMock package.

Jump to

Keyboard shortcuts

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