host

package
v1.0.0-beta.43 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package host manages the state and reconcilement of bare metal host objects.

Index

Constants

View Source
const (

	// PostInstallScriptFinished is a marker in the output of installimage. If it is not present,
	// then install-image failed.
	PostInstallScriptFinished = "POST_INSTALL_SCRIPT_FINISHED"
)

Variables

This section is empty.

Functions

func CalculateBackoff

func CalculateBackoff(errorCount int) (time.Duration, error)

CalculateBackoff calculates the reconciliation backoff. Distribution sample for errorCount values: 1 [1m, 2m] 2 [2m, 4m] 3 [4m, 8m] 4 [8m, 16m] 5 [16m, 32m] 6 [32m, 1h4m] 7 [1h4m, 2h8m] 8 [2h8m, 4h16m] 9 [4h16m, 8h32m].

func SaveHostAndReturn

func SaveHostAndReturn(ctx context.Context, cl client.Client, host *infrav1.HetznerBareMetalHost) (res reconcile.Result, err error)

SaveHostAndReturn saves host object, updates LastUpdated in host status and returns the reconcile Result.

Types

type Service

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

Service defines struct with machine scope to reconcile HetznerBareMetalHosts.

func NewService

func NewService(s *scope.BareMetalHostScope) *Service

NewService outs a new service with machine scope.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) (result reconcile.Result, err error)

Reconcile implements reconcilement of HetznerBareMetalHosts.

Jump to

Keyboard shortcuts

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