tasks

package
v0.0.0-...-fd46d7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	rest.Client
}

Client is an interface for performing requests against the Proxmox 'tasks' API.

func (*Client) ExpandPath

func (c *Client) ExpandPath(path string) string

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.

func (*Client) WaitForTask

func (c *Client) WaitForTask(ctx context.Context, upid string, timeoutSec, delaySec int) error

WaitForTask waits for a specific task to complete.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL