Documentation ¶
Index ¶
- type Client
- func (c *Client) GetOptions(ctx context.Context) (*GetOptionsResponse, error)
- func (c *Client) GetStatus(ctx context.Context) (*GetStatusResponse, error)
- func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
- func (c *Client) Log(ctx context.Context, req *LogRequest) (*LogResponse, error)
- func (c *Client) Nextid(ctx context.Context, req *NextidRequest) (*NextidResponse, error)
- func (c *Client) Resources(ctx context.Context, req *ResourcesRequest) (*ResourcesResponse, error)
- func (c *Client) SetOptions(ctx context.Context, req *SetOptionsRequest) (*SetOptionsResponse, error)
- func (c *Client) Tasks(ctx context.Context) (*TasksResponse, error)
- type GetOptionsResponse
- type GetStatusResponse
- type HTTPClient
- type IndexResponse
- type LogRequest
- type LogResponse
- type NextidRequest
- type NextidResponse
- type ResourcesRequest
- type ResourcesResponse
- type SetOptionsRequest
- type SetOptionsResponse
- type TasksResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) GetOptions ¶
func (c *Client) GetOptions(ctx context.Context) (*GetOptionsResponse, error)
GetOptions Get datacenter options. Without 'Sys.Audit' on '/' not all options are returned.
func (*Client) GetStatus ¶
func (c *Client) GetStatus(ctx context.Context) (*GetStatusResponse, error)
GetStatus Get cluster status information.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
Index Cluster index.
func (*Client) Log ¶
func (c *Client) Log(ctx context.Context, req *LogRequest) (*LogResponse, error)
Log Read cluster log
func (*Client) Nextid ¶
func (c *Client) Nextid(ctx context.Context, req *NextidRequest) (*NextidResponse, error)
Nextid Get next free VMID. Pass a VMID to assert that its free (at time of check).
func (*Client) Resources ¶
func (c *Client) Resources(ctx context.Context, req *ResourcesRequest) (*ResourcesResponse, error)
Resources Resources index (cluster wide).
func (*Client) SetOptions ¶
func (c *Client) SetOptions(ctx context.Context, req *SetOptionsRequest) (*SetOptionsResponse, error)
SetOptions Set datacenter options.
type GetOptionsResponse ¶
type GetOptionsResponse map[string]interface{}
type GetStatusResponse ¶
type GetStatusResponse []*struct { Id string `url:"id",json:"id"` Name string `url:"name",json:"name"` Type string `url:"type",json:"type"` // Indicates the type, either cluster or node. The type defines the object properties e.g. quorate available for type cluster. // The following parameters are optional Ip *string `url:"ip,omitempty",json:"ip,omitempty"` // [node] IP of the resolved nodename. Level *string `url:"level,omitempty",json:"level,omitempty"` // [node] Proxmox VE Subscription level, indicates if eligible for enterprise support as well as access to the stable Proxmox VE Enterprise Repository. Local *bool `url:"local,omitempty",json:"local,omitempty"` // [node] Indicates if this is the responding node. Nodeid *int `url:"nodeid,omitempty",json:"nodeid,omitempty"` // [node] ID of the node from the corosync configuration. Nodes *int `url:"nodes,omitempty",json:"nodes,omitempty"` // [cluster] Nodes count, including offline nodes. Online *bool `url:"online,omitempty",json:"online,omitempty"` // [node] Indicates if the node is online or offline. Quorate *bool `url:"quorate,omitempty",json:"quorate,omitempty"` // [cluster] Indicates if there is a majority of nodes online to make decisions Version *int `url:"version,omitempty",json:"version,omitempty"` // [cluster] Current version of the corosync configuration file. }
type HTTPClient ¶
type IndexResponse ¶
type IndexResponse []*map[string]interface{}
type LogRequest ¶
type LogRequest map[string]interface{}
type LogResponse ¶
type LogResponse []*map[string]interface{}
type NextidRequest ¶
type NextidRequest map[string]interface{}
type NextidResponse ¶
type NextidResponse int
type ResourcesRequest ¶
type ResourcesRequest map[string]interface{}
type ResourcesResponse ¶
type ResourcesResponse []*struct { Id string `url:"id",json:"id"` Type string `url:"type",json:"type"` // Resource type. // The following parameters are optional CgroupMode *int `url:"cgroup-mode,omitempty",json:"cgroup-mode,omitempty"` // The cgroup mode the node operates under (when type == node). Content *string `url:"content,omitempty",json:"content,omitempty"` // Allowed storage content types (when type == storage). Cpu *float64 `url:"cpu,omitempty",json:"cpu,omitempty"` // CPU utilization (when type in node,qemu,lxc). Disk *int `url:"disk,omitempty",json:"disk,omitempty"` // Used disk space in bytes (when type in storage), used root image spave for VMs (type in qemu,lxc). Hastate *string `url:"hastate,omitempty",json:"hastate,omitempty"` // HA service status (for HA managed VMs). Level *string `url:"level,omitempty",json:"level,omitempty"` // Support level (when type == node). Maxcpu *float64 `url:"maxcpu,omitempty",json:"maxcpu,omitempty"` // Number of available CPUs (when type in node,qemu,lxc). Maxdisk *int `url:"maxdisk,omitempty",json:"maxdisk,omitempty"` // Storage size in bytes (when type in storage), root image size for VMs (type in qemu,lxc). Maxmem *int `url:"maxmem,omitempty",json:"maxmem,omitempty"` // Number of available memory in bytes (when type in node,qemu,lxc). Mem *int `url:"mem,omitempty",json:"mem,omitempty"` // Used memory in bytes (when type in node,qemu,lxc). Name *string `url:"name,omitempty",json:"name,omitempty"` // Name of the resource. Node *string `url:"node,omitempty",json:"node,omitempty"` // The cluster node name (when type in node,storage,qemu,lxc). Plugintype *string `url:"plugintype,omitempty",json:"plugintype,omitempty"` // More specific type, if available. Pool *string `url:"pool,omitempty",json:"pool,omitempty"` // The pool name (when type in pool,qemu,lxc). Status *string `url:"status,omitempty",json:"status,omitempty"` // Resource type dependent status. Storage *string `url:"storage,omitempty",json:"storage,omitempty"` // The storage identifier (when type == storage). Uptime *int `url:"uptime,omitempty",json:"uptime,omitempty"` // Node uptime in seconds (when type in node,qemu,lxc). Vmid *int `url:"vmid,omitempty",json:"vmid,omitempty"` // The numerical vmid (when type in qemu,lxc). }
type SetOptionsRequest ¶
type SetOptionsRequest map[string]interface{}
type SetOptionsResponse ¶
type SetOptionsResponse map[string]interface{}
type TasksResponse ¶
type TasksResponse []*struct { Upid string `url:"upid",json:"upid"` }
Click to show internal directories.
Click to hide internal directories.