host

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateBackoff

func CalculateBackoff(errorCount int) time.Duration

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 SetErrorCondition

func SetErrorCondition(ctx context.Context, host *infrav1.HetznerBareMetalHost, client client.Client, errType infrav1.ErrorType, message string) error

SetErrorCondition sets the error in host status and updates the host object.

func SetErrorMessage

func SetErrorMessage(host *infrav1.HetznerBareMetalHost, errType infrav1.ErrorType, message string)

SetErrorMessage updates the ErrorMessage in the host Status struct and increases the ErrorCount.

Types

type Service

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

Service defines struct with machine scope to reconcile HetznerBareMetalHosts.

func NewService

func NewService(scope *scope.BareMetalHostScope) *Service

NewService outs a new service with machine scope.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) (_ *ctrl.Result, err error)

Delete implements delete method of bare metal hosts.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) (_ *ctrl.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