Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identifier ¶
type Identifier string
func IdentifierFromString ¶
func IdentifierFromString(identifier string) (Identifier, error)
func (Identifier) String ¶
func (m Identifier) String() string
type Machine ¶
type Machine struct { Identifier Identifier AgentEndpoint MachineEndpoint AgentApiKey AgentKey PowerCapabilities PowerCapabilities Class machine.MachineClass Tags []*tag.Tag LastHeartbeat time.Time RegisteredAt time.Time UpdatedAt time.Time Status *power.Status Host *host.Host Cpu *cpu.CPU Memory *memory.Memory Disks []*storage.Disk NetworkInterfaces []*network.Nic Volumes []*storage.Volume Addresses []*network.IpAddress }
func NewMachine ¶
func NewMachine(identifier Identifier, endpoint MachineEndpoint, key AgentKey, class machine.MachineClass, lastHeartbeat time.Time, registeredAt time.Time, updatedAt time.Time, status *power.Status, cap PowerCapabilities, host *host.Host, cpu *cpu.CPU, memory *memory.Memory, disks []*storage.Disk, networkInterfaces []*network.Nic, volumes []*storage.Volume, addresses []*network.IpAddress) *Machine
type MachineEndpoint ¶
type MachineEndpoint string
func MachineEndpointFromString ¶
func MachineEndpointFromString(v string) (MachineEndpoint, error)
func (MachineEndpoint) String ¶
func (m MachineEndpoint) String() string
type PowerCapabilities ¶
type PowerCapabilities struct { WakeOnLan PowerCapabilityWakeOnLan PowerOff PowerCapabilityPowerOff Reboot PowerCapabilityReboot }
func NewPowerCapabilities ¶
func NewPowerCapabilities(wakeOnLan *PowerCapabilityWakeOnLan, powerOff *PowerCapabilityPowerOff, reboot *PowerCapabilityReboot) *PowerCapabilities
type PowerCapabilityPowerOff ¶
type PowerCapabilityPowerOff struct {
Enabled bool
}
func NewPowerCapabilityPowerOff ¶
func NewPowerCapabilityPowerOff(enabled bool) *PowerCapabilityPowerOff
type PowerCapabilityReboot ¶
type PowerCapabilityReboot struct {
Enabled bool
}
func NewPowerCapabilityReboot ¶
func NewPowerCapabilityReboot(enabled bool) *PowerCapabilityReboot
type PowerCapabilityWakeOnLan ¶
type PowerCapabilityWakeOnLan struct { Enabled bool MacAddress *network.MacAddress }
func NewPowerCapabilityWakeOnLan ¶
func NewPowerCapabilityWakeOnLan(enabled bool, macAddress *network.MacAddress) *PowerCapabilityWakeOnLan
Click to show internal directories.
Click to hide internal directories.