Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HostnameKey is the key for indexing hostname in log message HostnameKey = "hostname" // HostPoolKey is the key for indexing host pool ID in log message HostPoolKey = "host_pool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostPool ¶
type HostPool interface { // ID returns host pool id. ID() string // Hosts returns all hosts in the pool as a map from hostname to host summary. Hosts() map[string]struct{} // Add adds given host to the pool. Add(host string) // Delete deletes given host from the pool. Delete(host string) // Cleanup deletes all hosts from the pool. Cleanup() // RefreshMetrics refreshes metrics of the host pool. RefreshMetrics() // Get capacity of the pool. Capacity() host.ResourceCapacity // Recalculate host-pool capacity from given host capacities. RefreshCapacity(hostCapacities map[string]*host.ResourceCapacity) }
HostPool represents a set of hosts as a virtual host pool And provides abstraction to operate a host pool.
Click to show internal directories.
Click to hide internal directories.