hostpool

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: 2 Imported by: 0

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.
	// TODO: Consider what host data host pool needs to track.
	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()
}

HostPool represents a set of hosts as a virtual host pool And provides abstraction to operate a host pool.

func New

func New(id string) HostPool

New returns a new hostPool instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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