clustvirt/cluster/cluster.go
Matthew Stobbs 9d3fc15ab1 more stats work
added templ file for basic stat output of cluster
2024-03-18 23:48:24 -06:00

27 lines
959 B
Go

// 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
}