Documentation
¶
Index ¶
- type CpuInfo
- type Login
- type Network
- type NetworkResponse
- type Node
- type PveClient
- func (client *PveClient) CheckLogin() error
- func (client *PveClient) GetNode(name string) (*Node, error)
- func (client *PveClient) GetNodeList() ([]string, error)
- func (client *PveClient) GetNodeNetworks(name string) ([]Network, error)
- func (client *PveClient) GetQemuStatus(name string, vmid string) (*QemuStatus, error)
- func (client *PveClient) GetResources() ([]interface{}, error)
- func (client *PveClient) GetTasks() ([]Task, error)
- func (client *PveClient) Login() (*Login, error)
- func (client PveClient) SetDebug(debug bool)
- type QemuStatus
- type Resource
- type ResourceResponse
- type Size
- type Task
- type TaskResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct {
Active bool `json:"active"`
AutoStart bool `json:"autostart"`
Exists bool `json:"exists"`
BridgeForwardDelay int16 `json:"bridge_fd,string"`
BridgePorts string `json:"bridge_ports"`
BridgeStp bool `json:"bridge_stp"`
Iface string `json:"iface"`
Method string `json:"method"`
Address string `json:"address"`
NetMask string `json:"netmask"`
Gateway string `json:"gateway"`
Type string `json:"type"`
Priority uint8 `json:"priority"`
}
func (*Network) UnmarshalJSON ¶
type NetworkResponse ¶
type NetworkResponse struct {
Data []Network `json:"data"`
}
type Node ¶
type Node struct {
Cpu float64 `json:"cpu"`
Wait float64 `json:"wait"`
CpuInfo CpuInfo `json:"cpuinfo"`
KVersion string `json:"kversion"`
PveVersion string `json:"pveversion"`
Uptime int64 `json:"uptime"`
LoadAvg []float64 `json:"loadavg"`
Memory Size `json:"memory"`
Swap Size `json:"swap"`
RootFS Size `json:"rootfs"`
}
func (*Node) UnmarshalJSON ¶
type PveClient ¶
type PveClient struct {
// contains filtered or unexported fields
}
func NewPveClient ¶
func (*PveClient) CheckLogin ¶
func (*PveClient) GetNodeList ¶
func (*PveClient) GetNodeNetworks ¶
func (*PveClient) GetQemuStatus ¶
func (client *PveClient) GetQemuStatus(name string, vmid string) (*QemuStatus, error)
func (*PveClient) GetResources ¶
type QemuStatus ¶
type QemuStatus struct {
Cpu float64 `json:"cpu"`
Disk uint8 `json:"disk"`
Name string `json:"name"`
Status string `json:"status"`
Template string `json:"template"`
Pid uint16 `json:"pid,string"`
DiskRead uint64 `json:"diskread"`
DiskWrite uint64 `json:"diskwrite"`
Maxmem uint64 `json:"maxmem"`
Maxdisk uint64 `json:"maxdisk"`
Uptime uint32 `json:"uptime"`
Mem uint64 `json:"mem"`
NetIn uint64 `json:"netin"`
NetOut uint64 `json:"netout"`
}
type Resource ¶
type Resource struct {
Data []interface{} `json:"data"`
}
func (*Resource) UnmarshalJSON ¶
type ResourceResponse ¶
type ResourceResponse struct {
Data []json.RawMessage `json:"data"`
}
type Task ¶
type Task struct {
Id string `json:"id"`
Node string `json:"node"`
Saved bool `json:"saved"`
StartTime time.Time `json:"starttime"`
EndTime time.Time `json:"endtime"`
Status string `json:"status"`
Type string `json:"type"`
UPid string `json:"upid"`
User string `json:"user"`
}
func (*Task) UnmarshalJSON ¶
type TaskResponse ¶
type TaskResponse struct {
Data []Task `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.