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 OldCluster
- func (c *OldCluster) AddDroplet(newd *Droplet) bool
- func (c *OldCluster) AddDropletLocal(name string, hypername string) *Droplet
- func (c *OldCluster) AddDropletSimple(uuid string, hostname string, cpus int, mem int) *Droplet
- func (c *OldCluster) AddEvent(e *Event)
- func (c *OldCluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
- func (c *OldCluster) BlankFields()
- func (c *OldCluster) ChangeDropletState(d *Droplet, newState DropletState) error
- func (c *OldCluster) ClusterStable() (bool, string)
- func (c *OldCluster) ConfigLoad() error
- func (c *OldCluster) ConfigSave() error
- func (c *OldCluster) DropletMoved(d *Droplet, newh *Hypervisor) error
- func (c *OldCluster) DropletReady(d *Droplet) (bool, string)
- func (c *OldCluster) DropletsAll() *DropletScanner
- func (c *OldCluster) DumpDroplet(w http.ResponseWriter, r *http.Request) (string, error)
- func (c *OldCluster) FindDropletByName(name string) *Droplet
- func (c *OldCluster) FindHypervisorByName(name string) *Hypervisor
- func (c *OldCluster) GetDropletsPB() *Droplets
- func (c *OldCluster) GetEventsPB() *Events
- func (c *OldCluster) GetHypervisorsPB() *Hypervisors
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 OldCluster ¶ added in v0.2.33
type OldCluster 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 CreateSampleCluster(total int) *OldCluster
func InitCluster ¶ added in v0.2.1
func InitCluster() *OldCluster
func (*OldCluster) AddDroplet ¶ added in v0.2.33
func (c *OldCluster) AddDroplet(newd *Droplet) bool
adds a new droplet. enforce unique hostnames
func (*OldCluster) AddDropletLocal ¶ added in v0.2.33
func (c *OldCluster) AddDropletLocal(name string, hypername string) *Droplet
This isn't for the marketing department
func (*OldCluster) AddDropletSimple ¶ added in v0.2.33
func (c *OldCluster) AddDropletSimple(uuid string, hostname string, cpus int, mem int) *Droplet
func (*OldCluster) AddEvent ¶ added in v0.2.33
func (c *OldCluster) AddEvent(e *Event)
func (*OldCluster) AddHypervisor ¶ added in v0.2.33
func (c *OldCluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
func (*OldCluster) BlankFields ¶ added in v0.2.33
func (c *OldCluster) BlankFields()
func (*OldCluster) ChangeDropletState ¶ added in v0.2.33
func (c *OldCluster) ChangeDropletState(d *Droplet, newState DropletState) error
records an event that the droplet changed state (aka turned on, turned off, etc)
func (*OldCluster) ClusterStable ¶ added in v0.2.33
func (c *OldCluster) ClusterStable() (bool, string)
func (*OldCluster) ConfigLoad ¶ added in v0.2.33
func (c *OldCluster) ConfigLoad() error
func (*OldCluster) ConfigSave ¶ added in v0.2.33
func (c *OldCluster) ConfigSave() error
writes out the cluster information it seperate files to make it humanly possible to hand edit things as needed
func (*OldCluster) DropletMoved ¶ added in v0.2.33
func (c *OldCluster) DropletMoved(d *Droplet, newh *Hypervisor) error
records an event that the droplet migrated to another hypervisor
func (*OldCluster) DropletReady ¶ added in v0.2.33
func (c *OldCluster) DropletReady(d *Droplet) (bool, string)
check the cluster and droplet to make sure it's ready to start
func (*OldCluster) DropletsAll ¶ added in v0.2.33
func (c *OldCluster) DropletsAll() *DropletScanner
func (*OldCluster) DumpDroplet ¶ added in v0.2.33
func (c *OldCluster) DumpDroplet(w http.ResponseWriter, r *http.Request) (string, error)
func (*OldCluster) FindDropletByName ¶ added in v0.2.33
func (c *OldCluster) FindDropletByName(name string) *Droplet
func (*OldCluster) FindHypervisorByName ¶ added in v0.2.33
func (c *OldCluster) FindHypervisorByName(name string) *Hypervisor
func (*OldCluster) GetDropletsPB ¶ added in v0.2.33
func (c *OldCluster) GetDropletsPB() *Droplets
func (*OldCluster) GetEventsPB ¶ added in v0.2.33
func (c *OldCluster) GetEventsPB() *Events
func (*OldCluster) GetHypervisorsPB ¶ added in v0.2.33
func (c *OldCluster) GetHypervisorsPB() *Hypervisors
Click to show internal directories.
Click to hide internal directories.