Documentation
¶
Index ¶
- Variables
- 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 Archive
- type ArchiveIterator
- 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
- type Current
- func (*Current) Descriptor() ([]byte, []int)deprecated
- func (x *Current) GetFullXml() string
- func (x *Current) GetHypervisor() string
- func (x *Current) GetImageUrl() string
- func (x *Current) GetLastPoll() *timestamppb.Timestamp
- func (x *Current) GetOffSince() *timestamppb.Timestamp
- func (x *Current) GetOnSince() *timestamppb.Timestamp
- func (x *Current) GetStartAttempts() int64
- func (x *Current) GetState() DropletState
- func (*Current) ProtoMessage()
- func (x *Current) ProtoReflect() protoreflect.Message
- func (x *Current) Reset()
- func (x *Current) String() string
- type CurrentIterator
- type Disk
- func (*Disk) Descriptor() ([]byte, []int)deprecated
- func (x *Disk) GetFilename() string
- func (x *Disk) GetFilepath() string
- func (x *Disk) GetQemuArch() string
- func (x *Disk) GetSize() int64
- func (*Disk) ProtoMessage()
- func (x *Disk) ProtoReflect() protoreflect.Message
- func (x *Disk) Reset()
- func (x *Disk) String() string
- type DiskIterator
- type Droplet
- func (*Droplet) Descriptor() ([]byte, []int)deprecated
- func (d *Droplet) DumpDroplet(w http.ResponseWriter, r *http.Request) (string, error)
- func (v *Droplet) FormatJSON() string
- func (v *Droplet) FormatTEXT() string
- func (x *Droplet) GetArchive() *Archive
- func (x *Droplet) GetCpus() int64
- func (x *Droplet) GetCurrent() *Current
- func (x *Droplet) GetCustomXml() string
- func (x *Droplet) GetDisks() []*Disk
- func (x *Droplet) GetForceHypervisor() string
- func (x *Droplet) GetHostname() string
- func (x *Droplet) GetLocalOnly() string
- func (x *Droplet) GetMemory() int64
- func (x *Droplet) GetNetworks() []*Network
- func (x *Droplet) GetPreferredArch() string
- func (x *Droplet) GetPreferredHypervisor() string
- func (x *Droplet) GetQemuMachine() string
- func (x *Droplet) GetSpicePort() int64
- func (x *Droplet) GetStartState() DropletState
- func (x *Droplet) GetUnstable() *timestamppb.Timestamp
- func (x *Droplet) GetUnstableTimeout() *durationpb.Duration
- func (x *Droplet) GetUuid() string
- func (v *Droplet) Marshal() ([]byte, error)
- func (v *Droplet) MarshalJSON() ([]byte, error)
- func (d *Droplet) NewChangeEvent(fname string, origval any, newval any) *Event
- func (*Droplet) ProtoMessage()
- func (x *Droplet) ProtoReflect() protoreflect.Message
- func (x *Droplet) Reset()
- func (d *Droplet) SetCpus(b int64)
- func (d *Droplet) SetMemory(b int64) *Event
- func (d *Droplet) SetState(newState DropletState)
- func (d *Droplet) SprintDumpHeader() string
- func (d *Droplet) SprintHeader() string
- func (x *Droplet) String() string
- func (v *Droplet) Unmarshal(data []byte) error
- func (v *Droplet) UnmarshalJSON(data []byte) error
- func (v *Droplet) UnmarshalTEXT(data []byte) error
- type DropletArchive
- func (DropletArchive) Descriptor() protoreflect.EnumDescriptor
- func (x DropletArchive) Enum() *DropletArchive
- func (DropletArchive) EnumDescriptor() ([]byte, []int)deprecated
- func (x DropletArchive) Number() protoreflect.EnumNumber
- func (x DropletArchive) String() string
- func (DropletArchive) Type() protoreflect.EnumType
- type DropletIterator
- type DropletState
- func (DropletState) Descriptor() protoreflect.EnumDescriptor
- func (x DropletState) Enum() *DropletState
- func (DropletState) EnumDescriptor() ([]byte, []int)deprecated
- func (x DropletState) Number() protoreflect.EnumNumber
- func (x DropletState) String() string
- func (DropletState) Type() protoreflect.EnumType
- type Droplets
- func (x *Droplets) All() *DropletIterator
- func (x *Droplets) Append(y *Droplet)
- func (x *Droplets) AppendByHostname(y *Droplet) bool
- func (x *Droplets) AppendByUuid(y *Droplet) bool
- func (x *Droplets) Delete(y *Droplet) bool
- func (x *Droplets) DeleteByHostname(s string) bool
- func (x *Droplets) DeleteByUuid(s string) bool
- func (*Droplets) Descriptor() ([]byte, []int)deprecated
- func (x *Droplets) FindByHostname(s string) *Droplet
- func (x *Droplets) FindByUuid(s string) *Droplet
- func (v *Droplets) FormatJSON() string
- func (v *Droplets) FormatTEXT() string
- func (x *Droplets) GetDroplets() []*Droplet
- func (x *Droplets) GetUuid() string
- func (x *Droplets) GetVersion() string
- func (x *Droplets) Len() int
- func (v *Droplets) Marshal() ([]byte, error)
- func (v *Droplets) MarshalJSON() ([]byte, error)
- func (*Droplets) ProtoMessage()
- func (x *Droplets) ProtoReflect() protoreflect.Message
- func (x *Droplets) Reset()
- func (x *Droplets) String() string
- func (v *Droplets) Unmarshal(data []byte) error
- func (v *Droplets) UnmarshalJSON(data []byte) error
- func (v *Droplets) UnmarshalTEXT(data []byte) error
- type DropletsIterator
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetDroplet() string
- func (x *Event) GetDropletUuid() string
- func (x *Event) GetEnd() *timestamppb.Timestamp
- func (x *Event) GetEtype() EventType
- func (x *Event) GetFieldName() string
- func (x *Event) GetHypervisor() string
- func (x *Event) GetHypervisorUuid() string
- func (x *Event) GetId() int32
- func (x *Event) GetNewAny() *anypb.Any
- func (x *Event) GetNewVal() string
- func (x *Event) GetOrigAny() *anypb.Any
- func (x *Event) GetOrigVal() string
- func (x *Event) GetStart() *timestamppb.Timestamp
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventIterator
- type EventType
- type Events
- func (x *Events) All() *EventIterator
- func (x *Events) Append(y *Event)
- func (epb *Events) AppendEvent(e *Event)
- func (x *Events) Delete(y *Event) bool
- func (*Events) Descriptor() ([]byte, []int)deprecated
- func (v *Events) FormatJSON() string
- func (v *Events) FormatTEXT() string
- func (x *Events) GetEventSize() int64
- func (x *Events) GetEvents() []*Event
- func (x *Events) GetUuid() string
- func (x *Events) GetVersion() string
- func (x *Events) Len() int
- func (v *Events) Marshal() ([]byte, error)
- func (v *Events) MarshalJSON() ([]byte, error)
- func (*Events) ProtoMessage()
- func (x *Events) ProtoReflect() protoreflect.Message
- func (x *Events) Reset()
- func (x *Events) String() string
- func (v *Events) Unmarshal(data []byte) error
- func (v *Events) UnmarshalJSON(data []byte) error
- func (v *Events) UnmarshalTEXT(data []byte) error
- type EventsIterator
- type Experiment
- type ExperimentIterator
- type Experiments
- func (x *Experiments) All() *ExperimentIterator
- func (x *Experiments) Append(y *Experiment)
- func (x *Experiments) Delete(y *Experiment) bool
- func (*Experiments) Descriptor() ([]byte, []int)deprecated
- func (v *Experiments) FormatJSON() string
- func (v *Experiments) FormatTEXT() string
- func (x *Experiments) GetExperiments() []*Experiment
- func (x *Experiments) GetUuid() string
- func (x *Experiments) GetVersion() string
- func (x *Experiments) Len() int
- func (v *Experiments) Marshal() ([]byte, error)
- func (v *Experiments) MarshalJSON() ([]byte, error)
- func (*Experiments) ProtoMessage()
- func (x *Experiments) ProtoReflect() protoreflect.Message
- func (x *Experiments) Reset()
- func (x *Experiments) String() string
- func (v *Experiments) Unmarshal(data []byte) error
- func (v *Experiments) UnmarshalJSON(data []byte) error
- func (v *Experiments) UnmarshalTEXT(data []byte) error
- type ExperimentsIterator
- type Hypervisor
- func (*Hypervisor) Descriptor() ([]byte, []int)deprecated
- func (x *Hypervisor) GetActive() bool
- func (x *Hypervisor) GetArch() HypervisorArch
- func (x *Hypervisor) GetAutoscan() bool
- func (x *Hypervisor) GetComment() string
- func (x *Hypervisor) GetCpus() int64
- func (x *Hypervisor) GetHostname() string
- func (x *Hypervisor) GetMemory() int64
- func (x *Hypervisor) GetUuid() string
- func (*Hypervisor) ProtoMessage()
- func (x *Hypervisor) ProtoReflect() protoreflect.Message
- func (x *Hypervisor) Reset()
- func (x *Hypervisor) SetMemoryGB(gb int)
- func (x *Hypervisor) String() string
- type HypervisorArch
- func (HypervisorArch) Descriptor() protoreflect.EnumDescriptor
- func (x HypervisorArch) Enum() *HypervisorArch
- func (HypervisorArch) EnumDescriptor() ([]byte, []int)deprecated
- func (x HypervisorArch) Number() protoreflect.EnumNumber
- func (x HypervisorArch) String() string
- func (HypervisorArch) Type() protoreflect.EnumType
- type HypervisorIterator
- type Hypervisors
- func (x *Hypervisors) All() *HypervisorIterator
- func (x *Hypervisors) Append(y *Hypervisor)
- func (x *Hypervisors) AppendByHostname(y *Hypervisor) bool
- func (x *Hypervisors) AppendByUuid(y *Hypervisor) bool
- func (x *Hypervisors) Delete(y *Hypervisor) bool
- func (x *Hypervisors) DeleteByHostname(s string) bool
- func (x *Hypervisors) DeleteByUuid(s string) bool
- func (*Hypervisors) Descriptor() ([]byte, []int)deprecated
- func (x *Hypervisors) FindByHostname(s string) *Hypervisor
- func (x *Hypervisors) FindByUuid(s string) *Hypervisor
- func (v *Hypervisors) FormatJSON() string
- func (v *Hypervisors) FormatTEXT() string
- func (x *Hypervisors) GetHypervisors() []*Hypervisor
- func (x *Hypervisors) GetUuid() string
- func (x *Hypervisors) GetVersion() string
- func (x *Hypervisors) Len() int
- func (v *Hypervisors) Marshal() ([]byte, error)
- func (v *Hypervisors) MarshalJSON() ([]byte, error)
- func (*Hypervisors) ProtoMessage()
- func (x *Hypervisors) ProtoReflect() protoreflect.Message
- func (x *Hypervisors) Reset()
- func (x *Hypervisors) String() string
- func (v *Hypervisors) Unmarshal(data []byte) error
- func (v *Hypervisors) UnmarshalJSON(data []byte) error
- func (v *Hypervisors) UnmarshalTEXT(data []byte) error
- type HypervisorsIterator
- type Network
- type NetworkIterator
- type WhatInfo
- type WhatInfoIterator
- type WhatsThis
- func (*WhatsThis) Descriptor() ([]byte, []int)deprecated
- func (x *WhatsThis) GetEnd() *timestamppb.Timestamp
- func (x *WhatsThis) GetHumantest() *WhatInfo
- func (x *WhatsThis) GetNewVal() *anypb.Any
- func (x *WhatsThis) GetOrigVal() *anypb.Any
- func (*WhatsThis) ProtoMessage()
- func (x *WhatsThis) ProtoReflect() protoreflect.Message
- func (x *WhatsThis) Reset()
- func (x *WhatsThis) String() string
- type WhatsThisIterator
Constants ¶
This section is empty.
Variables ¶
var ( DropletState_name = map[int32]string{ 0: "ON", 1: "OFF", 2: "UNKNOWN", 3: "PAUSED", 4: "CRASHED", 5: "INMIGRATE", } DropletState_value = map[string]int32{ "ON": 0, "OFF": 1, "UNKNOWN": 2, "PAUSED": 3, "CRASHED": 4, "INMIGRATE": 5, } )
Enum value maps for DropletState.
var ( DropletArchive_name = map[int32]string{ 0: "DUP", 1: "USER", } DropletArchive_value = map[string]int32{ "DUP": 0, "USER": 1, } )
Enum value maps for DropletArchive.
var ( EventType_name = map[int32]string{ 0: "ADD", 1: "DELETE", 2: "POWERON", 3: "POWEROFF", 4: "HIBERNATE", 5: "MIGRATE", 6: "DEMO", 7: "GET", 8: "LOGIN", 9: "OK", 10: "FAIL", 11: "CRASH", 12: "CHANGE", } EventType_value = map[string]int32{ "ADD": 0, "DELETE": 1, "POWERON": 2, "POWEROFF": 3, "HIBERNATE": 4, "MIGRATE": 5, "DEMO": 6, "GET": 7, "LOGIN": 8, "OK": 9, "FAIL": 10, "CRASH": 11, "CHANGE": 12, } )
Enum value maps for EventType.
var ( HypervisorArch_name = map[int32]string{ 0: "RISCV64", 1: "X86_64", 2: "ARM64", } HypervisorArch_value = map[string]int32{ "RISCV64": 0, "X86_64": 1, "ARM64": 2, } )
Enum value maps for HypervisorArch.
var File_droplet_proto protoreflect.FileDescriptor
var File_event_proto protoreflect.FileDescriptor
var File_experiment_proto protoreflect.FileDescriptor
var File_hypervisor_proto protoreflect.FileDescriptor
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 Archive ¶ added in v0.2.4
type Archive struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Reason DropletArchive `protobuf:"varint,1,opt,name=reason,proto3,enum=virtbuf.DropletArchive" json:"reason,omitempty"` // why the droplet was archived
When *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=when,proto3" json:"when,omitempty"` // when it was archived
// contains filtered or unexported fields
}
func (*Archive) Descriptor
deprecated
added in
v0.2.4
func (*Archive) GetReason ¶ added in v0.2.4
func (x *Archive) GetReason() DropletArchive
func (*Archive) GetWhen ¶ added in v0.2.4
func (x *Archive) GetWhen() *timestamppb.Timestamp
func (*Archive) ProtoMessage ¶ added in v0.2.4
func (*Archive) ProtoMessage()
func (*Archive) ProtoReflect ¶ added in v0.2.4
func (x *Archive) ProtoReflect() protoreflect.Message
type ArchiveIterator ¶ added in v0.2.19
type ArchiveIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*ArchiveIterator) Next ¶ added in v0.2.19
func (it *ArchiveIterator) Next() *Archive
Next() returns the next thing in the array
func (*ArchiveIterator) Scan ¶ added in v0.2.19
func (it *ArchiveIterator) Scan() bool
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 (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
func (*Cluster) BlankFields ¶ added in v0.2.5
func (c *Cluster) BlankFields()
func (*Cluster) ChangeDropletState ¶ added in v0.2.5
func (c *Cluster) ChangeDropletState(d *Droplet, newState DropletState) error
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
func (c *Cluster) DropletMoved(d *Droplet, newh *Hypervisor) error
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
func (c *Cluster) FindHypervisorByName(name string) *Hypervisor
type Current ¶ added in v0.2.4
type Current struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
State DropletState `protobuf:"varint,1,opt,name=state,proto3,enum=virtbuf.DropletState" json:"state,omitempty"` // used to track the current state before taking any action
Hypervisor string `protobuf:"bytes,2,opt,name=hypervisor,proto3" json:"hypervisor,omitempty"` // the current hypervisor the droplet is running on
StartAttempts int64 `protobuf:"varint,3,opt,name=start_attempts,json=startAttempts,proto3" json:"start_attempts,omitempty"` // how many times a start has been attempted
FullXml string `protobuf:"bytes,4,opt,name=full_xml,json=fullXml,proto3" json:"full_xml,omitempty"` // the full libvirt xml to import
LastPoll *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_poll,json=lastPoll,proto3" json:"last_poll,omitempty"` // the last time we heard anything from this droplet
ImageUrl string `protobuf:"bytes,6,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // url to the image
OffSince *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=off_since,json=offSince,proto3" json:"off_since,omitempty"` // when the droplet was turned off
OnSince *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=on_since,json=onSince,proto3" json:"on_since,omitempty"` // when the droplet was turned on
// contains filtered or unexported fields
}
volatile data. the current settings and values of things. These are passed around while the cluster to monitor and control the systems but they are not saved to the config file
func (*Current) Descriptor
deprecated
added in
v0.2.4
func (*Current) GetFullXml ¶ added in v0.2.4
func (*Current) GetHypervisor ¶ added in v0.2.4
func (*Current) GetImageUrl ¶ added in v0.2.4
func (*Current) GetLastPoll ¶ added in v0.2.4
func (x *Current) GetLastPoll() *timestamppb.Timestamp
func (*Current) GetOffSince ¶ added in v0.2.4
func (x *Current) GetOffSince() *timestamppb.Timestamp
func (*Current) GetOnSince ¶ added in v0.2.4
func (x *Current) GetOnSince() *timestamppb.Timestamp
func (*Current) GetStartAttempts ¶ added in v0.2.4
func (*Current) GetState ¶ added in v0.2.4
func (x *Current) GetState() DropletState
func (*Current) ProtoMessage ¶ added in v0.2.4
func (*Current) ProtoMessage()
func (*Current) ProtoReflect ¶ added in v0.2.4
func (x *Current) ProtoReflect() protoreflect.Message
type CurrentIterator ¶ added in v0.2.19
type CurrentIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*CurrentIterator) Next ¶ added in v0.2.19
func (it *CurrentIterator) Next() *Current
Next() returns the next thing in the array
func (*CurrentIterator) Scan ¶ added in v0.2.19
func (it *CurrentIterator) Scan() bool
type Disk ¶ added in v0.2.4
type Disk struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Filepath string `protobuf:"bytes,2,opt,name=filepath,proto3" json:"filepath,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
QemuArch string `protobuf:"bytes,4,opt,name=qemu_arch,json=qemuArch,proto3" json:"qemu_arch,omitempty"` // what arch. example: "x86_64" or "riscv64"
// contains filtered or unexported fields
}
func (*Disk) Descriptor
deprecated
added in
v0.2.4
func (*Disk) GetFilename ¶ added in v0.2.4
func (*Disk) GetFilepath ¶ added in v0.2.4
func (*Disk) GetQemuArch ¶ added in v0.2.4
func (*Disk) ProtoMessage ¶ added in v0.2.4
func (*Disk) ProtoMessage()
func (*Disk) ProtoReflect ¶ added in v0.2.4
func (x *Disk) ProtoReflect() protoreflect.Message
type DiskIterator ¶ added in v0.2.19
type DiskIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*DiskIterator) Next ¶ added in v0.2.19
func (it *DiskIterator) Next() *Disk
Next() returns the next thing in the array
func (*DiskIterator) Scan ¶ added in v0.2.19
func (it *DiskIterator) Scan() bool
type Droplet ¶ added in v0.2.4
type Droplet struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:unique` // should be unique across the cluster
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // `autogenpb:unique` // should be unique and work in DNS
Cpus int64 `protobuf:"varint,3,opt,name=cpus,proto3" json:"cpus,omitempty"` // what's the point of int64 vs int32
Memory int64 `protobuf:"varint,4,opt,name=memory,proto3" json:"memory,omitempty"` // in bytes
Current *Current `protobuf:"bytes,5,opt,name=current,proto3" json:"current,omitempty"` // what the state and values of the droplet is
StartState DropletState `protobuf:"varint,6,opt,name=start_state,json=startState,proto3,enum=virtbuf.DropletState" json:"start_state,omitempty"` // what the state of the droplet is SUPPOSED TO BE ('on' or 'off')
QemuMachine string `protobuf:"bytes,7,opt,name=qemu_machine,json=qemuMachine,proto3" json:"qemu_machine,omitempty"` // the qemu machine type to use "pc-q35-9.0"
SpicePort int64 `protobuf:"varint,8,opt,name=spice_port,json=spicePort,proto3" json:"spice_port,omitempty"` // preferred port to use for spice
PreferredHypervisor string `protobuf:"bytes,9,opt,name=preferred_hypervisor,json=preferredHypervisor,proto3" json:"preferred_hypervisor,omitempty"` // the hypervisor to prefer to run the droplet on
ForceHypervisor string `protobuf:"bytes,10,opt,name=force_hypervisor,json=forceHypervisor,proto3" json:"force_hypervisor,omitempty"` // use this hypervisor and this hypervisor only
PreferredArch string `protobuf:"bytes,11,opt,name=preferred_arch,json=preferredArch,proto3" json:"preferred_arch,omitempty"` // the cpu arch to use "x86_64" (should really get this from the disk?)
Networks []*Network `protobuf:"bytes,12,rep,name=networks,proto3" json:"networks,omitempty"` // really just mac addresses. should be unique across cluster
Disks []*Disk `protobuf:"bytes,13,rep,name=disks,proto3" json:"disks,omitempty"` // disks to attach
LocalOnly string `protobuf:"bytes,14,opt,name=local_only,json=localOnly,proto3" json:"local_only,omitempty"` // this is only defined locally on the hypervisor
CustomXml string `protobuf:"bytes,15,opt,name=custom_xml,json=customXml,proto3" json:"custom_xml,omitempty"` // if needed,
Archive *Archive `protobuf:"bytes,16,opt,name=archive,proto3" json:"archive,omitempty"` // what the state of the droplet is SUPPOSED TO BE ('on' or 'off')
Unstable *timestamppb.Timestamp `protobuf:"bytes,39,opt,name=unstable,proto3" json:"unstable,omitempty"` // the last time we heard anything from this droplet
UnstableTimeout *durationpb.Duration `protobuf:"bytes,40,opt,name=unstable_timeout,json=unstableTimeout,proto3" json:"unstable_timeout,omitempty"` // the last time we heard anything from this droplet
// contains filtered or unexported fields
}
func CreateSampleDroplet ¶ added in v0.2.4
func NewDefaultDroplet ¶ added in v0.2.7
creates a new droplet with default values
func (*Droplet) Descriptor
deprecated
added in
v0.2.4
func (*Droplet) DumpDroplet ¶ added in v0.2.4
func (*Droplet) FormatJSON ¶ added in v0.2.4
human readable JSON
func (*Droplet) FormatTEXT ¶ added in v0.2.4
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Droplet) GetArchive ¶ added in v0.2.4
func (*Droplet) GetCurrent ¶ added in v0.2.4
func (*Droplet) GetCustomXml ¶ added in v0.2.4
func (*Droplet) GetForceHypervisor ¶ added in v0.2.4
func (*Droplet) GetHostname ¶ added in v0.2.4
func (*Droplet) GetLocalOnly ¶ added in v0.2.4
func (*Droplet) GetNetworks ¶ added in v0.2.4
func (*Droplet) GetPreferredArch ¶ added in v0.2.4
func (*Droplet) GetPreferredHypervisor ¶ added in v0.2.4
func (*Droplet) GetQemuMachine ¶ added in v0.2.4
func (*Droplet) GetSpicePort ¶ added in v0.2.4
func (*Droplet) GetStartState ¶ added in v0.2.4
func (x *Droplet) GetStartState() DropletState
func (*Droplet) GetUnstable ¶ added in v0.2.4
func (x *Droplet) GetUnstable() *timestamppb.Timestamp
func (*Droplet) GetUnstableTimeout ¶ added in v0.2.4
func (x *Droplet) GetUnstableTimeout() *durationpb.Duration
func (*Droplet) MarshalJSON ¶ added in v0.2.4
marshal json
func (*Droplet) NewChangeEvent ¶ added in v0.2.4
Wrapping the int into a protobuf message
func (*Droplet) ProtoMessage ¶ added in v0.2.4
func (*Droplet) ProtoMessage()
func (*Droplet) ProtoReflect ¶ added in v0.2.4
func (x *Droplet) ProtoReflect() protoreflect.Message
func (*Droplet) SetState ¶ added in v0.2.4
func (d *Droplet) SetState(newState DropletState)
update the droplet memory
func (*Droplet) SprintDumpHeader ¶ added in v0.2.4
func (*Droplet) SprintHeader ¶ added in v0.2.4
func (*Droplet) UnmarshalJSON ¶ added in v0.2.4
unmarshal json
func (*Droplet) UnmarshalTEXT ¶ added in v0.2.10
unmarshalTEXT. This reads the .text config file back in after the user edits it
type DropletArchive ¶ added in v0.2.4
type DropletArchive int32
const ( DropletArchive_DUP DropletArchive = 0 DropletArchive_USER DropletArchive = 1 )
func (DropletArchive) Descriptor ¶ added in v0.2.4
func (DropletArchive) Descriptor() protoreflect.EnumDescriptor
func (DropletArchive) Enum ¶ added in v0.2.4
func (x DropletArchive) Enum() *DropletArchive
func (DropletArchive) EnumDescriptor
deprecated
added in
v0.2.4
func (DropletArchive) EnumDescriptor() ([]byte, []int)
Deprecated: Use DropletArchive.Descriptor instead.
func (DropletArchive) Number ¶ added in v0.2.4
func (x DropletArchive) Number() protoreflect.EnumNumber
func (DropletArchive) String ¶ added in v0.2.4
func (x DropletArchive) String() string
func (DropletArchive) Type ¶ added in v0.2.4
func (DropletArchive) Type() protoreflect.EnumType
type DropletIterator ¶ added in v0.2.1
type DropletIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*DropletIterator) Next ¶ added in v0.2.10
func (it *DropletIterator) Next() *Droplet
Next() returns the next thing in the array
func (*DropletIterator) Scan ¶ added in v0.2.1
func (it *DropletIterator) Scan() bool
type DropletState ¶ added in v0.2.4
type DropletState int32
virtual machine state
const ( DropletState_ON DropletState = 0 DropletState_OFF DropletState = 1 DropletState_UNKNOWN DropletState = 2 // qemu says 'Shutdown' DropletState_PAUSED DropletState = 3 DropletState_CRASHED DropletState = 4 DropletState_INMIGRATE DropletState = 5 )
func (DropletState) Descriptor ¶ added in v0.2.4
func (DropletState) Descriptor() protoreflect.EnumDescriptor
func (DropletState) Enum ¶ added in v0.2.4
func (x DropletState) Enum() *DropletState
func (DropletState) EnumDescriptor
deprecated
added in
v0.2.4
func (DropletState) EnumDescriptor() ([]byte, []int)
Deprecated: Use DropletState.Descriptor instead.
func (DropletState) Number ¶ added in v0.2.4
func (x DropletState) Number() protoreflect.EnumNumber
func (DropletState) String ¶ added in v0.2.4
func (x DropletState) String() string
func (DropletState) Type ¶ added in v0.2.4
func (DropletState) Type() protoreflect.EnumType
type Droplets ¶ added in v0.2.4
type Droplets struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:d5d492e2-38d4-476b-86f3-f5abf01f9d6d`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1`
Droplets []*Droplet `protobuf:"bytes,3,rep,name=droplets,proto3" json:"droplets,omitempty"`
// contains filtered or unexported fields
}
func NewDroplets ¶ added in v0.2.19
func NewDroplets() *Droplets
func (*Droplets) All ¶ added in v0.2.10
func (x *Droplets) All() *DropletIterator
func (*Droplets) Append ¶ added in v0.2.10
just a simple Append() shortcut (but still uses the mutex lock)
func (*Droplets) AppendByHostname ¶ added in v0.2.19
func (*Droplets) AppendByUuid ¶ added in v0.2.19
func (*Droplets) DeleteByHostname ¶ added in v0.2.10
func (*Droplets) DeleteByUuid ¶ added in v0.2.10
func (*Droplets) Descriptor
deprecated
added in
v0.2.4
func (*Droplets) FindByHostname ¶ added in v0.2.10
lookup a Droplets by the Hostname
func (*Droplets) FindByUuid ¶ added in v0.2.10
lookup a Droplets by the Uuid
func (*Droplets) FormatJSON ¶ added in v0.2.4
human readable JSON
func (*Droplets) FormatTEXT ¶ added in v0.2.4
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Droplets) GetDroplets ¶ added in v0.2.4
func (*Droplets) GetVersion ¶ added in v0.2.4
func (*Droplets) MarshalJSON ¶ added in v0.2.4
marshal json
func (*Droplets) ProtoMessage ¶ added in v0.2.4
func (*Droplets) ProtoMessage()
func (*Droplets) ProtoReflect ¶ added in v0.2.4
func (x *Droplets) ProtoReflect() protoreflect.Message
func (*Droplets) UnmarshalJSON ¶ added in v0.2.4
unmarshal json
func (*Droplets) UnmarshalTEXT ¶ added in v0.2.10
unmarshalTEXT. This reads the .text config file back in after the user edits it
type DropletsIterator ¶ added in v0.2.19
type DropletsIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*DropletsIterator) Next ¶ added in v0.2.19
func (it *DropletsIterator) Next() *Droplets
Next() returns the next thing in the array
func (*DropletsIterator) Scan ¶ added in v0.2.19
func (it *DropletsIterator) Scan() bool
type Event ¶ added in v0.2.4
type Event struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // `autogenpb:unique` // should be unique across the cluster
Etype EventType `protobuf:"varint,2,opt,name=etype,proto3,enum=virtbuf.EventType" json:"etype,omitempty"`
Droplet string `protobuf:"bytes,3,opt,name=droplet,proto3" json:"droplet,omitempty"` // name of the droplet
DropletUuid string `protobuf:"bytes,4,opt,name=droplet_uuid,json=dropletUuid,proto3" json:"droplet_uuid,omitempty"` // uuid of the droplet
Hypervisor string `protobuf:"bytes,5,opt,name=hypervisor,proto3" json:"hypervisor,omitempty"` // name of the hypervisor
HypervisorUuid string `protobuf:"bytes,6,opt,name=hypervisor_uuid,json=hypervisorUuid,proto3" json:"hypervisor_uuid,omitempty"` // uuid of the hypervisor
Start *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=start,proto3" json:"start,omitempty"` // start time
End *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=end,proto3" json:"end,omitempty"` // end time
FieldName string `protobuf:"bytes,9,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` // the field name that changed
OrigVal string `protobuf:"bytes,10,opt,name=orig_val,json=origVal,proto3" json:"orig_val,omitempty"` // original value
NewVal string `protobuf:"bytes,11,opt,name=new_val,json=newVal,proto3" json:"new_val,omitempty"` // new value
OrigAny *anypb.Any `protobuf:"bytes,12,opt,name=orig_any,json=origAny,proto3" json:"orig_any,omitempty"` // anypb format. probably overkill
NewAny *anypb.Any `protobuf:"bytes,13,opt,name=new_any,json=newAny,proto3" json:"new_any,omitempty"` // anypb format
// contains filtered or unexported fields
}
this information leans towards being human readable not programatic in other words, it's better to just have the droplet name here rather than the uuid at least for now in the early days. but maybe forever. homelab clouds normally don't have many events. we are talking less than 1 a minute. even 1 an hour is often a lot
func NewAddEvent ¶ added in v0.2.4
work in progress
func (*Event) Descriptor
deprecated
added in
v0.2.4
func (*Event) GetDroplet ¶ added in v0.2.4
func (*Event) GetDropletUuid ¶ added in v0.2.4
func (*Event) GetEnd ¶ added in v0.2.4
func (x *Event) GetEnd() *timestamppb.Timestamp
func (*Event) GetFieldName ¶ added in v0.2.4
func (*Event) GetHypervisor ¶ added in v0.2.4
func (*Event) GetHypervisorUuid ¶ added in v0.2.4
func (*Event) GetOrigAny ¶ added in v0.2.4
func (*Event) GetOrigVal ¶ added in v0.2.4
func (*Event) GetStart ¶ added in v0.2.4
func (x *Event) GetStart() *timestamppb.Timestamp
func (*Event) ProtoMessage ¶ added in v0.2.4
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶ added in v0.2.4
func (x *Event) ProtoReflect() protoreflect.Message
type EventIterator ¶ added in v0.2.10
type EventIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*EventIterator) Next ¶ added in v0.2.10
func (it *EventIterator) Next() *Event
Next() returns the next thing in the array
func (*EventIterator) Scan ¶ added in v0.2.10
func (it *EventIterator) Scan() bool
type EventType ¶ added in v0.2.4
type EventType int32
const ( EventType_ADD EventType = 0 EventType_DELETE EventType = 1 EventType_POWERON EventType = 2 EventType_POWEROFF EventType = 3 // should indicate a "normal" shutdown EventType_HIBERNATE EventType = 4 EventType_MIGRATE EventType = 5 EventType_DEMO EventType = 6 EventType_GET EventType = 7 // request something EventType_LOGIN EventType = 8 // attempt to login EventType_OK EventType = 9 // everything is ok EventType_FAIL EventType = 10 // everything failed EventType_CRASH EventType = 11 // droplet hard crashed EventType_CHANGE EventType = 12 // droplet or hypervisor config change )
func (EventType) Descriptor ¶ added in v0.2.4
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
added in
v0.2.4
func (EventType) Number ¶ added in v0.2.4
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶ added in v0.2.4
func (EventType) Type() protoreflect.EnumType
type Events ¶ added in v0.2.4
type Events struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:1e3a50c7-5916-4423-b33c-f0b977a7e446`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1`
EventSize int64 `protobuf:"varint,3,opt,name=event_size,json=eventSize,proto3" json:"event_size,omitempty"` // max events to store in a single
Events []*Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"` // all the events
// contains filtered or unexported fields
}
func CreateSampleEvents ¶ added in v0.2.4
func (*Events) All ¶ added in v0.2.10
func (x *Events) All() *EventIterator
func (*Events) Append ¶ added in v0.2.10
just a simple Append() shortcut (but still uses the mutex lock)
func (*Events) AppendEvent ¶ added in v0.2.4
func (*Events) Descriptor
deprecated
added in
v0.2.4
func (*Events) FormatJSON ¶ added in v0.2.4
human readable JSON
func (*Events) FormatTEXT ¶ added in v0.2.4
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Events) GetEventSize ¶ added in v0.2.4
func (*Events) GetVersion ¶ added in v0.2.4
func (*Events) MarshalJSON ¶ added in v0.2.4
marshal json
func (*Events) ProtoMessage ¶ added in v0.2.4
func (*Events) ProtoMessage()
func (*Events) ProtoReflect ¶ added in v0.2.4
func (x *Events) ProtoReflect() protoreflect.Message
func (*Events) UnmarshalJSON ¶ added in v0.2.4
unmarshal json
func (*Events) UnmarshalTEXT ¶ added in v0.2.11
unmarshalTEXT. This reads the .text config file back in after the user edits it
type EventsIterator ¶ added in v0.2.19
type EventsIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*EventsIterator) Next ¶ added in v0.2.19
func (it *EventsIterator) Next() *Events
Next() returns the next thing in the array
func (*EventsIterator) Scan ¶ added in v0.2.19
func (it *EventsIterator) Scan() bool
type Experiment ¶ added in v0.2.19
type Experiment struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
// contains filtered or unexported fields
}
func (*Experiment) Descriptor
deprecated
added in
v0.2.19
func (*Experiment) Descriptor() ([]byte, []int)
Deprecated: Use Experiment.ProtoReflect.Descriptor instead.
func (*Experiment) ProtoMessage ¶ added in v0.2.19
func (*Experiment) ProtoMessage()
func (*Experiment) ProtoReflect ¶ added in v0.2.19
func (x *Experiment) ProtoReflect() protoreflect.Message
func (*Experiment) Reset ¶ added in v0.2.19
func (x *Experiment) Reset()
func (*Experiment) String ¶ added in v0.2.19
func (x *Experiment) String() string
type ExperimentIterator ¶ added in v0.2.19
type ExperimentIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*ExperimentIterator) Next ¶ added in v0.2.19
func (it *ExperimentIterator) Next() *Experiment
Next() returns the next thing in the array
func (*ExperimentIterator) Scan ¶ added in v0.2.19
func (it *ExperimentIterator) Scan() bool
type Experiments ¶ added in v0.2.19
type Experiments struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:aadb95db-d798-4647-8c59-cce82e8f1ed6`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1`
Experiments []*Experiment `protobuf:"bytes,3,rep,name=Experiments,proto3" json:"Experiments,omitempty"` // THIS MUST BE Experiment and then Experiments
// contains filtered or unexported fields
}
func NewExperiments ¶ added in v0.2.19
func NewExperiments() *Experiments
func (*Experiments) All ¶ added in v0.2.19
func (x *Experiments) All() *ExperimentIterator
func (*Experiments) Append ¶ added in v0.2.19
func (x *Experiments) Append(y *Experiment)
just a simple Append() shortcut (but still uses the mutex lock)
func (*Experiments) Delete ¶ added in v0.2.19
func (x *Experiments) Delete(y *Experiment) bool
func (*Experiments) Descriptor
deprecated
added in
v0.2.19
func (*Experiments) Descriptor() ([]byte, []int)
Deprecated: Use Experiments.ProtoReflect.Descriptor instead.
func (*Experiments) FormatJSON ¶ added in v0.2.19
func (v *Experiments) FormatJSON() string
human readable JSON
func (*Experiments) FormatTEXT ¶ added in v0.2.19
func (v *Experiments) FormatTEXT() string
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Experiments) GetExperiments ¶ added in v0.2.19
func (x *Experiments) GetExperiments() []*Experiment
func (*Experiments) GetUuid ¶ added in v0.2.19
func (x *Experiments) GetUuid() string
func (*Experiments) GetVersion ¶ added in v0.2.19
func (x *Experiments) GetVersion() string
func (*Experiments) Len ¶ added in v0.2.19
func (x *Experiments) Len() int
func (*Experiments) Marshal ¶ added in v0.2.19
func (v *Experiments) Marshal() ([]byte, error)
marshal to wire. This is called winning.
func (*Experiments) MarshalJSON ¶ added in v0.2.19
func (v *Experiments) MarshalJSON() ([]byte, error)
marshal json
func (*Experiments) ProtoMessage ¶ added in v0.2.19
func (*Experiments) ProtoMessage()
func (*Experiments) ProtoReflect ¶ added in v0.2.19
func (x *Experiments) ProtoReflect() protoreflect.Message
func (*Experiments) Reset ¶ added in v0.2.19
func (x *Experiments) Reset()
func (*Experiments) String ¶ added in v0.2.19
func (x *Experiments) String() string
func (*Experiments) Unmarshal ¶ added in v0.2.19
func (v *Experiments) Unmarshal(data []byte) error
unmarshal from wire. You have won.
func (*Experiments) UnmarshalJSON ¶ added in v0.2.19
func (v *Experiments) UnmarshalJSON(data []byte) error
unmarshal json
func (*Experiments) UnmarshalTEXT ¶ added in v0.2.19
func (v *Experiments) UnmarshalTEXT(data []byte) error
unmarshalTEXT. This reads the .text config file back in after the user edits it
type ExperimentsIterator ¶ added in v0.2.19
type ExperimentsIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*ExperimentsIterator) Next ¶ added in v0.2.19
func (it *ExperimentsIterator) Next() *Experiments
Next() returns the next thing in the array
func (*ExperimentsIterator) Scan ¶ added in v0.2.19
func (it *ExperimentsIterator) Scan() bool
type Hypervisor ¶ added in v0.2.4
type Hypervisor struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:unique`
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // `autogenpb:unique`
Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` // is allowed to start new droplets
Cpus int64 `protobuf:"varint,4,opt,name=cpus,proto3" json:"cpus,omitempty"`
Memory int64 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"` // in bytes
Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
Autoscan bool `protobuf:"varint,7,opt,name=autoscan,proto3" json:"autoscan,omitempty"` // to scan or not to scan by virtigo
Arch HypervisorArch `protobuf:"varint,8,opt,name=arch,proto3,enum=virtbuf.HypervisorArch" json:"arch,omitempty"`
// contains filtered or unexported fields
}
func CreateSampleHypervisor ¶ added in v0.2.4
func CreateSampleHypervisor(hostname string, mem int) *Hypervisor
func (*Hypervisor) Descriptor
deprecated
added in
v0.2.4
func (*Hypervisor) Descriptor() ([]byte, []int)
Deprecated: Use Hypervisor.ProtoReflect.Descriptor instead.
func (*Hypervisor) GetActive ¶ added in v0.2.4
func (x *Hypervisor) GetActive() bool
func (*Hypervisor) GetArch ¶ added in v0.2.4
func (x *Hypervisor) GetArch() HypervisorArch
func (*Hypervisor) GetAutoscan ¶ added in v0.2.4
func (x *Hypervisor) GetAutoscan() bool
func (*Hypervisor) GetComment ¶ added in v0.2.4
func (x *Hypervisor) GetComment() string
func (*Hypervisor) GetCpus ¶ added in v0.2.4
func (x *Hypervisor) GetCpus() int64
func (*Hypervisor) GetHostname ¶ added in v0.2.4
func (x *Hypervisor) GetHostname() string
func (*Hypervisor) GetMemory ¶ added in v0.2.4
func (x *Hypervisor) GetMemory() int64
func (*Hypervisor) GetUuid ¶ added in v0.2.4
func (x *Hypervisor) GetUuid() string
func (*Hypervisor) ProtoMessage ¶ added in v0.2.4
func (*Hypervisor) ProtoMessage()
func (*Hypervisor) ProtoReflect ¶ added in v0.2.4
func (x *Hypervisor) ProtoReflect() protoreflect.Message
func (*Hypervisor) Reset ¶ added in v0.2.4
func (x *Hypervisor) Reset()
func (*Hypervisor) SetMemoryGB ¶ added in v0.2.4
func (x *Hypervisor) SetMemoryGB(gb int)
func (*Hypervisor) String ¶ added in v0.2.4
func (x *Hypervisor) String() string
type HypervisorArch ¶ added in v0.2.4
type HypervisorArch int32
think about this more
const ( HypervisorArch_RISCV64 HypervisorArch = 0 HypervisorArch_X86_64 HypervisorArch = 1 HypervisorArch_ARM64 HypervisorArch = 2 )
func (HypervisorArch) Descriptor ¶ added in v0.2.4
func (HypervisorArch) Descriptor() protoreflect.EnumDescriptor
func (HypervisorArch) Enum ¶ added in v0.2.4
func (x HypervisorArch) Enum() *HypervisorArch
func (HypervisorArch) EnumDescriptor
deprecated
added in
v0.2.4
func (HypervisorArch) EnumDescriptor() ([]byte, []int)
Deprecated: Use HypervisorArch.Descriptor instead.
func (HypervisorArch) Number ¶ added in v0.2.4
func (x HypervisorArch) Number() protoreflect.EnumNumber
func (HypervisorArch) String ¶ added in v0.2.4
func (x HypervisorArch) String() string
func (HypervisorArch) Type ¶ added in v0.2.4
func (HypervisorArch) Type() protoreflect.EnumType
type HypervisorIterator ¶ added in v0.2.10
type HypervisorIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*HypervisorIterator) Next ¶ added in v0.2.10
func (it *HypervisorIterator) Next() *Hypervisor
Next() returns the next thing in the array
func (*HypervisorIterator) Scan ¶ added in v0.2.10
func (it *HypervisorIterator) Scan() bool
type Hypervisors ¶ added in v0.2.4
type Hypervisors struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:6e3aa8b9-cf98-40f6-af58-3c6ad1edf4d4`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1`
Hypervisors []*Hypervisor `protobuf:"bytes,3,rep,name=hypervisors,proto3" json:"hypervisors,omitempty"`
// contains filtered or unexported fields
}
func NewHypervisors ¶ added in v0.2.19
func NewHypervisors() *Hypervisors
func (*Hypervisors) All ¶ added in v0.2.10
func (x *Hypervisors) All() *HypervisorIterator
func (*Hypervisors) Append ¶ added in v0.2.10
func (x *Hypervisors) Append(y *Hypervisor)
just a simple Append() shortcut (but still uses the mutex lock)
func (*Hypervisors) AppendByHostname ¶ added in v0.2.19
func (x *Hypervisors) AppendByHostname(y *Hypervisor) bool
func (*Hypervisors) AppendByUuid ¶ added in v0.2.19
func (x *Hypervisors) AppendByUuid(y *Hypervisor) bool
func (*Hypervisors) Delete ¶ added in v0.2.19
func (x *Hypervisors) Delete(y *Hypervisor) bool
func (*Hypervisors) DeleteByHostname ¶ added in v0.2.11
func (x *Hypervisors) DeleteByHostname(s string) bool
func (*Hypervisors) DeleteByUuid ¶ added in v0.2.11
func (x *Hypervisors) DeleteByUuid(s string) bool
func (*Hypervisors) Descriptor
deprecated
added in
v0.2.4
func (*Hypervisors) Descriptor() ([]byte, []int)
Deprecated: Use Hypervisors.ProtoReflect.Descriptor instead.
func (*Hypervisors) FindByHostname ¶ added in v0.2.11
func (x *Hypervisors) FindByHostname(s string) *Hypervisor
lookup a Hypervisors by the Hostname
func (*Hypervisors) FindByUuid ¶ added in v0.2.11
func (x *Hypervisors) FindByUuid(s string) *Hypervisor
lookup a Hypervisors by the Uuid
func (*Hypervisors) FormatJSON ¶ added in v0.2.4
func (v *Hypervisors) FormatJSON() string
human readable JSON
func (*Hypervisors) FormatTEXT ¶ added in v0.2.11
func (v *Hypervisors) FormatTEXT() string
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Hypervisors) GetHypervisors ¶ added in v0.2.4
func (x *Hypervisors) GetHypervisors() []*Hypervisor
func (*Hypervisors) GetUuid ¶ added in v0.2.4
func (x *Hypervisors) GetUuid() string
func (*Hypervisors) GetVersion ¶ added in v0.2.4
func (x *Hypervisors) GetVersion() string
func (*Hypervisors) Len ¶ added in v0.2.10
func (x *Hypervisors) Len() int
func (*Hypervisors) Marshal ¶ added in v0.2.11
func (v *Hypervisors) Marshal() ([]byte, error)
marshal to wire. This is called winning.
func (*Hypervisors) MarshalJSON ¶ added in v0.2.11
func (v *Hypervisors) MarshalJSON() ([]byte, error)
marshal json
func (*Hypervisors) ProtoMessage ¶ added in v0.2.4
func (*Hypervisors) ProtoMessage()
func (*Hypervisors) ProtoReflect ¶ added in v0.2.4
func (x *Hypervisors) ProtoReflect() protoreflect.Message
func (*Hypervisors) Reset ¶ added in v0.2.4
func (x *Hypervisors) Reset()
func (*Hypervisors) String ¶ added in v0.2.4
func (x *Hypervisors) String() string
func (*Hypervisors) Unmarshal ¶ added in v0.2.11
func (v *Hypervisors) Unmarshal(data []byte) error
unmarshal from wire. You have won.
func (*Hypervisors) UnmarshalJSON ¶ added in v0.2.11
func (v *Hypervisors) UnmarshalJSON(data []byte) error
unmarshal json
func (*Hypervisors) UnmarshalTEXT ¶ added in v0.2.11
func (v *Hypervisors) UnmarshalTEXT(data []byte) error
unmarshalTEXT. This reads the .text config file back in after the user edits it
type HypervisorsIterator ¶ added in v0.2.19
type HypervisorsIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*HypervisorsIterator) Next ¶ added in v0.2.19
func (it *HypervisorsIterator) Next() *Hypervisors
Next() returns the next thing in the array
func (*HypervisorsIterator) Scan ¶ added in v0.2.19
func (it *HypervisorsIterator) Scan() bool
type Network ¶ added in v0.2.4
type Network struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*Network) Descriptor
deprecated
added in
v0.2.4
func (*Network) ProtoMessage ¶ added in v0.2.4
func (*Network) ProtoMessage()
func (*Network) ProtoReflect ¶ added in v0.2.4
func (x *Network) ProtoReflect() protoreflect.Message
type NetworkIterator ¶ added in v0.2.19
type NetworkIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*NetworkIterator) Next ¶ added in v0.2.19
func (it *NetworkIterator) Next() *Network
Next() returns the next thing in the array
func (*NetworkIterator) Scan ¶ added in v0.2.19
func (it *NetworkIterator) Scan() bool
type WhatInfo ¶ added in v0.2.4
type WhatInfo struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
Capacity int64 `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"` // Stores the storage capacity in bytes.
// contains filtered or unexported fields
}
this is for exerimenting
func (*WhatInfo) Descriptor
deprecated
added in
v0.2.4
func (*WhatInfo) GetCapacity ¶ added in v0.2.4
func (*WhatInfo) ProtoMessage ¶ added in v0.2.4
func (*WhatInfo) ProtoMessage()
func (*WhatInfo) ProtoReflect ¶ added in v0.2.4
func (x *WhatInfo) ProtoReflect() protoreflect.Message
type WhatInfoIterator ¶ added in v0.2.19
type WhatInfoIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*WhatInfoIterator) Next ¶ added in v0.2.19
func (it *WhatInfoIterator) Next() *WhatInfo
Next() returns the next thing in the array
func (*WhatInfoIterator) Scan ¶ added in v0.2.19
func (it *WhatInfoIterator) Scan() bool
type WhatsThis ¶ added in v0.2.4
type WhatsThis struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
// is it possible to have custom formatting in JSON and TEXT marshal/unmarshal ?
Humantest *WhatInfo `protobuf:"bytes,1,opt,name=humantest,proto3" json:"humantest,omitempty"`
End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // end time
OrigVal *anypb.Any `protobuf:"bytes,3,opt,name=orig_val,json=origVal,proto3" json:"orig_val,omitempty"` // original value
NewVal *anypb.Any `protobuf:"bytes,4,opt,name=new_val,json=newVal,proto3" json:"new_val,omitempty"` // new value
// contains filtered or unexported fields
}
func CreateExperiment ¶ added in v0.2.4
func (*WhatsThis) Descriptor
deprecated
added in
v0.2.4
func (*WhatsThis) GetEnd ¶ added in v0.2.4
func (x *WhatsThis) GetEnd() *timestamppb.Timestamp
func (*WhatsThis) GetHumantest ¶ added in v0.2.4
func (*WhatsThis) GetOrigVal ¶ added in v0.2.4
func (*WhatsThis) ProtoMessage ¶ added in v0.2.4
func (*WhatsThis) ProtoMessage()
func (*WhatsThis) ProtoReflect ¶ added in v0.2.4
func (x *WhatsThis) ProtoReflect() protoreflect.Message
type WhatsThisIterator ¶ added in v0.2.19
type WhatsThisIterator struct {
sync.RWMutex // this isn't getting used properly yet?
// contains filtered or unexported fields
}
func (*WhatsThisIterator) Next ¶ added in v0.2.19
func (it *WhatsThisIterator) Next() *WhatsThis
Next() returns the next thing in the array
func (*WhatsThisIterator) Scan ¶ added in v0.2.19
func (it *WhatsThisIterator) Scan() bool
Source Files
¶
- add.go
- backupDir.go
- change.go
- cluster.go
- config.go
- configBackup.go
- droplet.marshal.pb.go
- droplet.pb.go
- droplet.sort.pb.go
- event.marshal.pb.go
- event.pb.go
- event.sort.pb.go
- experiment.marshal.pb.go
- experiment.pb.go
- experiment.sort.pb.go
- helpers.go
- human.go
- hypervisor.marshal.pb.go
- hypervisor.pb.go
- hypervisor.sort.pb.go
- sampleData.go
- storageinfo.go