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.
Click to show internal directories.
Click to hide internal directories.