Documentation ¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
- func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
- func (c *Client) ReadTaskLog(ctx context.Context, req *ReadTaskLogRequest) (*ReadTaskLogResponse, error)
- func (c *Client) ReadTaskStatus(ctx context.Context, req *ReadTaskStatusRequest) (*ReadTaskStatusResponse, error)
- type DeleteRequest
- type DeleteResponse
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type ReadTaskLogRequest
- type ReadTaskLogResponse
- type ReadTaskStatusRequest
- type ReadTaskStatusResponse
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) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Stop a task.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index Read task list for one node (finished tasks).
func (*Client) ReadTaskLog ¶
func (c *Client) ReadTaskLog(ctx context.Context, req *ReadTaskLogRequest) (*ReadTaskLogResponse, error)
ReadTaskLog Read task log.
func (*Client) ReadTaskStatus ¶
func (c *Client) ReadTaskStatus(ctx context.Context, req *ReadTaskStatusRequest) (*ReadTaskStatusResponse, error)
ReadTaskStatus Read task status.
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse map[string]interface{}
type FindRequest ¶
type FindResponse ¶
type FindResponse []*map[string]interface{}
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct { Node string `url:"node",json:"node"` // The cluster node name. // The following parameters are optional Errors *bool `url:"errors,omitempty",json:"errors,omitempty"` // Only list tasks with a status of ERROR. Limit *int `url:"limit,omitempty",json:"limit,omitempty"` // Only list this amount of tasks. Since *int `url:"since,omitempty",json:"since,omitempty"` // Only list tasks since this UNIX epoch. Source *string `url:"source,omitempty",json:"source,omitempty"` // List archived, active or all tasks. Start *int `url:"start,omitempty",json:"start,omitempty"` // List tasks beginning from this offset. Statusfilter *string `url:"statusfilter,omitempty",json:"statusfilter,omitempty"` // List of Task States that should be returned. Typefilter *string `url:"typefilter,omitempty",json:"typefilter,omitempty"` // Only list tasks of this type (e.g., vzstart, vzdump). Until *int `url:"until,omitempty",json:"until,omitempty"` // Only list tasks until this UNIX epoch. Userfilter *string `url:"userfilter,omitempty",json:"userfilter,omitempty"` // Only list tasks from this user. Vmid *int `url:"vmid,omitempty",json:"vmid,omitempty"` // Only list tasks for this VM. }
type IndexResponse ¶
type IndexResponse []*struct { Id string `url:"id",json:"id"` Node string `url:"node",json:"node"` Pid int `url:"pid",json:"pid"` Pstart int `url:"pstart",json:"pstart"` Starttime int `url:"starttime",json:"starttime"` Type string `url:"type",json:"type"` Upid string `url:"upid",json:"upid"` User string `url:"user",json:"user"` // The following parameters are optional Endtime *int `url:"endtime,omitempty",json:"endtime,omitempty"` Status *string `url:"status,omitempty",json:"status,omitempty"` }
type ReadTaskLogRequest ¶
type ReadTaskLogRequest struct { Node string `url:"node",json:"node"` // The cluster node name. Upid string `url:"upid",json:"upid"` // The task's unique ID. // The following parameters are optional Limit *int `url:"limit,omitempty",json:"limit,omitempty"` // The maximum amount of lines that should be printed. Start *int `url:"start,omitempty",json:"start,omitempty"` // The line number to start printing at. }
type ReadTaskLogResponse ¶
type ReadTaskStatusRequest ¶
type ReadTaskStatusResponse ¶
type ReadTaskStatusResponse struct { Id string `url:"id",json:"id"` Node string `url:"node",json:"node"` Pid int `url:"pid",json:"pid"` Starttime float64 `url:"starttime",json:"starttime"` Status string `url:"status",json:"status"` Type string `url:"type",json:"type"` Upid string `url:"upid",json:"upid"` User string `url:"user",json:"user"` // The following parameters are optional Exitstatus *string `url:"exitstatus,omitempty",json:"exitstatus,omitempty"` }
Click to show internal directories.
Click to hide internal directories.