v1alpha1

package
v0.0.0-...-b8de061 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 19 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) StartScheduler

func (s *MachineService) StartScheduler(ctx context.Context)

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 WithHorizon

func WithHorizon(horizon time.Duration) Option

func WithNamespace

func WithNamespace(namespace string) Option

func WithScheduler

func WithScheduler(scheduler *scheduler.Scheduler[*lifecyclev1alpha1.Machine]) Option

Jump to

Keyboard shortcuts

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