clustvirt/cluster/cluster.go

27 lines
959 B
Go
Raw Normal View History

2024-03-19 04:38:28 +00:00
// Package cluster is the unique portion of this application that implements
// basic cluster controls overtop of Libvirtd hosts. The controller is agnostic
// about where it is running, and doesn't need to be running on a host that
// has Libvirtd installed on it.
//
// The cluster can be configured through the use of TOML configuration file,
// or with CLI flags. This is done via the itegration of the greate go libraries
// spf13/viper and spf13/cobra.
package cluster
import (
"time"
"git.staur.ca/stobbsm/clustvirt/lib/host"
)
// Cluster is the data structure and controller for cluster access.
// Using it's methods, you can access hosts, virtual machines, health
// data, and more.
// Cluster implements a time.Ticker that will be used to check the connection
// status of hosts, and reconnect if a connection was blocked or interrupted.
type Cluster struct {
interval time.Duration
hosts map[string]*host.Host
defaultURI *host.URI
2024-03-19 04:38:28 +00:00
}