Documentation ¶
Index ¶
- type Client
- func (c *Client) BuildPath(taskID string, path string) (string, error)
- func (c *Client) ExpandPath(_ string) string
- func (c *Client) GetTaskStatus(ctx context.Context, upid string) (*GetTaskStatusResponseData, error)
- func (c *Client) WaitForTask(ctx context.Context, upid string, timeoutSec, delaySec int) error
- type GetTaskStatusResponseBody
- type GetTaskStatusResponseData
- type TaskID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an interface for performing requests against the Proxmox 'tasks' API.
func (*Client) ExpandPath ¶
ExpandPath expands a path relative to the client's base path.
func (*Client) GetTaskStatus ¶
func (c *Client) GetTaskStatus(ctx context.Context, upid string) (*GetTaskStatusResponseData, error)
GetTaskStatus retrieves the status of a task.
type GetTaskStatusResponseBody ¶
type GetTaskStatusResponseBody struct {
Data *GetTaskStatusResponseData `json:"data,omitempty"`
}
GetTaskStatusResponseBody contains the body from a node get task status response.
type GetTaskStatusResponseData ¶
type GetTaskStatusResponseData struct { PID int `json:"pid,omitempty"` Status string `json:"status,omitempty"` ExitCode string `json:"exitstatus,omitempty"` }
GetTaskStatusResponseData contains the data from a node get task status response.
type TaskID ¶ added in v0.30.3
type TaskID struct { NodeName string PID int64 PStart int64 StartTime time.Time Type string ID string User string }
TaskID contains the components of a PVE task ID.
func ParseTaskID ¶ added in v0.30.3
ParseTaskID parses a task ID into its component parts. The task ID is expected to be in the format of:
UPID:<node_name>:<pid_in_hex>:<pstart_in_hex>:<starttime_in_hex>:<type>:<id (optional)>:<user>@<realm>:
Click to show internal directories.
Click to hide internal directories.