Documentation ¶
Index ¶
- type Client
- func (c *Client) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
- func (c *Client) CreateTask(ctx context.Context, task *tes.Task) (*tes.CreateTaskResponse, error)
- func (c *Client) GetServiceInfo(ctx context.Context, req *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
- func (c *Client) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)
- func (c *Client) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
- func (c *Client) WaitForTask(ctx context.Context, taskIDs ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Marshaler *jsonpb.Marshaler Password string // contains filtered or unexported fields }
Client represents the HTTP Task client.
func NewClient ¶
NewClient returns a new HTTP client for accessing Create/List/Get/Cancel Task endpoints. "address" is the address of the TES server.
func (*Client) CancelTask ¶
func (c *Client) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
CancelTask POSTs to /v1/tasks/{id}:cancel
func (*Client) CreateTask ¶
CreateTask POSTs a Task message to /v1/tasks
func (*Client) GetServiceInfo ¶
func (c *Client) GetServiceInfo(ctx context.Context, req *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
GetServiceInfo returns result of GET /v1/tasks/service-info
func (*Client) ListTasks ¶
func (c *Client) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
ListTasks returns the result of GET /v1/tasks
Click to show internal directories.
Click to hide internal directories.