Documentation ¶
Index ¶
- type Client
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
- func (c *Client) VmReboot(ctx context.Context, req VmRebootRequest) (string, error)
- func (c *Client) VmResume(ctx context.Context, req VmResumeRequest) (string, error)
- func (c *Client) VmShutdown(ctx context.Context, req VmShutdownRequest) (string, error)
- func (c *Client) VmStart(ctx context.Context, req VmStartRequest) (string, error)
- func (c *Client) VmStatusCurrent(ctx context.Context, req VmStatusCurrentRequest) (VmStatusCurrentResponse, error)
- func (c *Client) VmStop(ctx context.Context, req VmStopRequest) (string, error)
- func (c *Client) VmSuspend(ctx context.Context, req VmSuspendRequest) (string, error)
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type Status
- type VmRebootRequest
- type VmResumeRequest
- type VmShutdownRequest
- type VmStartRequest
- type VmStatusCurrentRequest
- type VmStatusCurrentResponse
- type VmStopRequest
- type VmSuspendRequest
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) Index ¶
func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
Index Directory index
func (*Client) VmReboot ¶
VmReboot Reboot the container by shutting it down, and starting it again. Applies pending changes.
func (*Client) VmShutdown ¶
VmShutdown Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.
func (*Client) VmStatusCurrent ¶
func (c *Client) VmStatusCurrent(ctx context.Context, req VmStatusCurrentRequest) (VmStatusCurrentResponse, error)
VmStatusCurrent Get virtual machine status.
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse struct {
Subdir string `url:"subdir" json:"subdir"`
}
type VmRebootRequest ¶
type VmRebootRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Timeout *int `url:"timeout,omitempty" json:"timeout,omitempty"` // Wait maximal timeout seconds for the shutdown. }
type VmResumeRequest ¶
type VmShutdownRequest ¶
type VmShutdownRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Forcestop *util.PVEBool `url:"forceStop,omitempty" json:"forceStop,omitempty"` // Make sure the Container stops. Timeout *int `url:"timeout,omitempty" json:"timeout,omitempty"` // Wait maximal timeout seconds. }
type VmStartRequest ¶
type VmStartRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Debug *util.PVEBool `url:"debug,omitempty" json:"debug,omitempty"` // If set, enables very verbose debug log-level on start. Skiplock *util.PVEBool `url:"skiplock,omitempty" json:"skiplock,omitempty"` // Ignore locks - only root is allowed to use this option. }
type VmStatusCurrentRequest ¶
type VmStatusCurrentResponse ¶
type VmStatusCurrentResponse struct { Ha map[string]interface{} `url:"ha" json:"ha"` // HA manager service status. Status Status `url:"status" json:"status"` // LXC Container status. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Cpus *float64 `url:"cpus,omitempty" json:"cpus,omitempty"` // Maximum usable CPUs. Lock *string `url:"lock,omitempty" json:"lock,omitempty"` // The current config lock, if any. Maxdisk *int `url:"maxdisk,omitempty" json:"maxdisk,omitempty"` // Root disk size in bytes. Maxmem *int `url:"maxmem,omitempty" json:"maxmem,omitempty"` // Maximum memory in bytes. Maxswap *int `url:"maxswap,omitempty" json:"maxswap,omitempty"` // Maximum SWAP memory in bytes. Name *string `url:"name,omitempty" json:"name,omitempty"` // Container name. Tags *string `url:"tags,omitempty" json:"tags,omitempty"` // The current configured tags, if any. Uptime *int `url:"uptime,omitempty" json:"uptime,omitempty"` // Uptime. }
type VmStopRequest ¶
type VmStopRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Skiplock *util.PVEBool `url:"skiplock,omitempty" json:"skiplock,omitempty"` // Ignore locks - only root is allowed to use this option. }
type VmSuspendRequest ¶
Click to show internal directories.
Click to hide internal directories.