manager

package
v0.0.0-...-d2b1cdf Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostPoolLabelValues

func GetHostPoolLabelValues(
	manager HostPoolManager,
	hostname string,
) (constraints.LabelValues, error)

GetHostPoolLabelValues creates a LabelValues for host pool of a host.

Types

type HostPoolManager

type HostPoolManager interface {
	// GetPool gets a host pool from cache by given pool id.
	GetPool(poolID string) (hostpool.HostPool, error)

	// Pools returns all host pools from cache.
	Pools() map[string]hostpool.HostPool

	// GetPoolByHostname returns the host pool given host belongs to.
	GetPoolByHostname(hostname string) (hostpool.HostPool, error)

	// RegisterPool creates a host pool with given ID if not exists.
	RegisterPool(poolID string)

	// DeregisterPool deletes existing host pool with given ID.
	DeregisterPool(poolID string)

	// ChangeHostPool changes host pool of given host from source pool to
	// destination pool.
	ChangeHostPool(host, srcPool, destPool string) error

	// Start starts the host pool cache go routine that reconciles host pools.
	Start()

	// Stop stops the host pool cache go routine that reconciles host pools.
	Stop()
}

HostPoolManager provides abstraction to manage host pools of a cluster.

func New

func New(eventStreamHandler *eventstream.Handler) HostPoolManager

New returns a host pool manager instance. TODO: Decide if we need to register a list of pre-configured

host pools at start-up

TODO: Hard code reconcile internal for now, will make it configurable later.

Jump to

Keyboard shortcuts

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