Documentation
¶
Index ¶
- func ConfigWriteJSON(a any, filename string) error
- func ConfigWriteTEXT(a any, filename string) error
- func FormatDuration(d time.Duration) string
- func HumanFormatBytes(b int64) string
- func SetGB(gb int) int64
- func SetMB(mb int) int64
- type Cluster
- func (c *Cluster) AddDroplet(newd *Droplet) bool
- func (c *Cluster) AddDropletLocal(name string, hypername string) *Droplet
- func (c *Cluster) AddDropletSimple(uuid string, hostname string, cpus int, mem int) *Droplet
- func (c *Cluster) AddEvent(e *Event)
- func (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
- func (c *Cluster) BlankFields()
- func (c *Cluster) ChangeDropletState(d *Droplet, newState DropletState) error
- func (c *Cluster) ClusterStable() (bool, string)
- func (c *Cluster) ConfigLoad() error
- func (c *Cluster) ConfigSave() error
- func (c *Cluster) DropletMoved(d *Droplet, newh *Hypervisor) error
- func (c *Cluster) DropletReady(d *Droplet) (bool, string)
- func (c *Cluster) DropletsAll() *DropletIterator
- func (c *Cluster) DumpDroplet(w http.ResponseWriter, r *http.Request) (string, error)
- func (c *Cluster) FindDropletByName(name string) *Droplet
- func (c *Cluster) FindHypervisorByName(name string) *Hypervisor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigWriteJSON ¶
func ConfigWriteTEXT ¶
func FormatDuration ¶ added in v0.2.1
func HumanFormatBytes ¶
This isn't for the marketing department so this isn't going to use 'MiB' and 'GiB'
Types ¶
type Cluster ¶ added in v0.2.5
type Cluster struct { sync.RWMutex Dirs []string H *Hypervisors Unstable *timestamppb.Timestamp UnstableTimeout *durationpb.Duration // contains filtered or unexported fields }
func CreateSampleCluster ¶ added in v0.2.1
func InitCluster ¶ added in v0.2.1
func InitCluster() *Cluster
func (*Cluster) AddDroplet ¶ added in v0.2.5
adds a new droplet. enforce unique hostnames
func (*Cluster) AddDropletLocal ¶ added in v0.2.5
This isn't for the marketing department
func (*Cluster) AddDropletSimple ¶ added in v0.2.5
func (*Cluster) AddHypervisor ¶ added in v0.2.5
func (*Cluster) BlankFields ¶ added in v0.2.5
func (c *Cluster) BlankFields()
func (*Cluster) ChangeDropletState ¶ added in v0.2.5
records an event that the droplet changed state (aka turned on, turned off, etc)
func (*Cluster) ClusterStable ¶ added in v0.2.5
func (*Cluster) ConfigLoad ¶ added in v0.2.5
func (*Cluster) ConfigSave ¶ added in v0.2.5
writes out the cluster information it seperate files to make it humanly possible to hand edit things as needed
func (*Cluster) DropletMoved ¶ added in v0.2.5
records an event that the droplet migrated to another hypervisor
func (*Cluster) DropletReady ¶ added in v0.2.5
check the cluster and droplet to make sure it's ready to start
func (*Cluster) DropletsAll ¶ added in v0.2.5
func (c *Cluster) DropletsAll() *DropletIterator
func (*Cluster) DumpDroplet ¶ added in v0.2.5
func (*Cluster) FindDropletByName ¶ added in v0.2.5
func (*Cluster) FindHypervisorByName ¶ added in v0.2.5
Click to show internal directories.
Click to hide internal directories.