hibernation

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 41 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ControllerName is the name of this controller
	ControllerName = hivev1.HibernationControllerName
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Hibernation controller and adds it to the manager with default RBAC.

func AddToManager

func AddToManager(mgr manager.Manager, r *hibernationReconciler, concurrentReconciles int, rateLimiter workqueue.RateLimiter) error

AddToManager adds a new Controller to the controller manager

func NewReconciler

func NewReconciler(mgr manager.Manager, rateLimiter flowcontrol.RateLimiter) *hibernationReconciler

NewReconciler returns a new Reconciler

func RegisterActuator

func RegisterActuator(a HibernationActuator)

RegisterActuator register an actuator with this controller. The actuator determines whether it can handle a particular cluster deployment via the CanHandle function.

Types

type HibernationActuator

type HibernationActuator interface {
	// CanHandle returns true if the actuator can handle a particular ClusterDeployment
	CanHandle(cd *hivev1.ClusterDeployment) bool
	// StopMachines will start machines belonging to the given ClusterDeployment
	StopMachines(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) error
	// StartMachines will select machines belonging to the given ClusterDeployment
	StartMachines(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) error
	// MachinesRunning will return true if the machines associated with the given
	// ClusterDeployment are in a running state.
	MachinesRunning(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) (bool, error)
	// MachinesStopped will return true if the machines associated with the given
	// ClusterDeployment are in a stopped state.
	MachinesStopped(cd *hivev1.ClusterDeployment, hiveClient client.Client, logger log.FieldLogger) (bool, error)
}

HibernationActuator is the interface that the hibernation controller uses to interact with cloud providers.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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