v1alpha1

package
v0.0.0-...-b5764cd Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AddPackageFailureReason = "package already in the list"
	SetPackageFailureReason = "package is not in the list"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MachineService

type MachineService struct {
	machinev1alpha1connect.UnimplementedMachineServiceHandler
	// contains filtered or unexported fields
}

func NewService

func NewService(cfg *rest.Config, opts ...Option) *MachineService

func (*MachineService) Install

Install schedules package installation for target Machine.

func (*MachineService) ListMachines

ListMachines returns the list of Machine objects.

func (*MachineService) ScanMachine

ScanMachine runs scan job for target Machine. First it checks whether Machine state is in service's cache. If cache entry is found, it checks whether last scan timestamp is within defined horizon. If not, scan job will be spawned. Otherwise, cached state will be returned in response.

func (*MachineService) UpdateMachineStatus

UpdateMachineStatus request initialized by the spawned Job and should update the status of processed Machine. If request succeed, Job exits with exit code 0, otherwise, Job will stop with non-zero exit code.

type Option

type Option func(service *MachineService)

func WithCache

func WithCache(cache *ttlcache.Cache[string, *machinev1alpha1.MachineStatus]) Option

func WithHorizon

func WithHorizon(horizon time.Duration) Option

func WithNamespace

func WithNamespace(namespace string) Option

func WithScanPeriod

func WithScanPeriod(period time.Duration) Option

Jump to

Keyboard shortcuts

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