health

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDoguChecker

func NewDoguChecker(ecosystemClient ecoSystem.EcoSystemV1Alpha1Interface, localFetcher cloudogu.LocalDoguFetcher) *doguChecker

NewDoguChecker creates a checker for dogu health.

Types

type AvailabilityChecker added in v0.40.0

type AvailabilityChecker struct{}

func (*AvailabilityChecker) IsAvailable added in v0.40.0

func (ac *AvailabilityChecker) IsAvailable(deployment *appsv1.Deployment) bool

IsAvailable checks whether the deployment has reached its desired state and is available.

type DoguHealthError

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

DoguHealthError is a dogu validation error. Instances can be unwrapped. Instances can be type asserted.

func NewDoguHealthError

func NewDoguHealthError(err error) *DoguHealthError

NewDoguHealthError creates a new dogu health error.

func (*DoguHealthError) Error

func (dhe *DoguHealthError) Error() string

Error returns the full error message as string.

func (*DoguHealthError) Unwrap

func (dhe *DoguHealthError) Unwrap() error

Unwrap returns the original error.

type DoguStatusUpdater added in v0.40.0

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

func NewDoguStatusUpdater added in v0.40.0

func NewDoguStatusUpdater(ecosystemClient ecoSystem.EcoSystemV1Alpha1Interface, recorder record.EventRecorder) *DoguStatusUpdater

func (*DoguStatusUpdater) UpdateStatus added in v0.40.0

func (dsw *DoguStatusUpdater) UpdateStatus(ctx context.Context, doguName types.NamespacedName, isAvailable bool) error

UpdateStatus sets the health status of the dogu according to whether if it's available or not.

type ShutdownHandler added in v1.0.0

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

func NewShutdownHandler added in v1.0.0

func NewShutdownHandler(doguInterface ecoSystem.DoguInterface) *ShutdownHandler

func (*ShutdownHandler) Start added in v1.0.0

func (s *ShutdownHandler) Start(ctx context.Context) error

type StartupHandler added in v1.0.0

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

func NewStartupHandler added in v1.0.0

func NewStartupHandler(doguInterface cloudogu.DoguInterface, deploymentInterface v1.DeploymentInterface,
	availabilityChecker cloudogu.DeploymentAvailabilityChecker, healthUpdater cloudogu.DoguHealthStatusUpdater) *StartupHandler

func (*StartupHandler) Start added in v1.0.0

func (s *StartupHandler) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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