device

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RebootingReason           = "Rebooting"
	OsImageDegradedReason     = "OSImageControllerDegraded"
	BootedWithUnexpectedImage = "BootedWithUnexpectedImage"
)
View Source
const BannerFile = "/etc/issue.d/flightctl-banner.issue"

agent banner file

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

func NewAgent

func NewAgent(
	name string,
	deviceWriter fileio.Writer,
	statusManager status.Manager,
	specManager spec.Manager,
	appManager applications.Manager,
	fetchSpecInterval util.Duration,
	fetchStatusInterval util.Duration,
	hookManager hook.Manager,
	applicationsController *applications.Controller,
	configController *config.Controller,
	osImageController *OSImageController,
	resourceController *resource.Controller,
	consoleController *console.ConsoleController,
	bootcClient container.BootcClient,
	podmanClient *client.Podman,
	backoff wait.Backoff,
	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.

func (*Agent) Stop added in v0.3.0

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

Stop ensures that the device agent stops reconciling during graceful shutdown.

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,
	hookManager hook.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 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 applications is a generated GoMock package.
Package applications is a generated GoMock package.
Package console is a generated GoMock package.
Package console is a generated GoMock package.
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