device

package
v0.0.0-...-2b06d51 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

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 workloads, configuration and status of the device.

func NewAgent

func NewAgent(
	name string,
	deviceWriter *fileio.Writer,
	statusManager status.Manager,
	specManager *spec.Manager,
	fetchSpecInterval time.Duration,
	fetchStatusInterval time.Duration,
	configController *config.Controller,
	osImageController *OSImageController,
	log *logrus.Logger,
	logPrefix string,
) *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,
	deviceWriter *fileio.Writer,
	deviceReader *fileio.Reader,
	enrollmentCSR []byte,
	statusManager status.Manager,
	enrollmentClient *client.Enrollment,
	managementEndpoint string,
	enrollmentUIEndpoint string,
	caFile string,
	keyFile string,
	managementGeneratedCertFile string,
	backoff wait.Backoff,
	currentRenderedFile string,
	desiredRenderedFile string,
	log *logrus.Logger,
	logPrefix string,
) *Bootstrap

func (*Bootstrap) Initialize

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

type OSImageController

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

func NewOSImageController

func NewOSImageController(
	executer executer.Executer,
	statusManager status.Manager,
	log *logrus.Logger,
	logPrefix string,
) *OSImageController

func (*OSImageController) Sync

Directories

Path Synopsis
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