Documentation ¶
Overview ¶
Returns a list of tasks.
Index ¶
- Variables
- type List
- func (r *List) Actions(v string) *List
- func (r *List) Detailed(b bool) *List
- func (r List) Do(ctx context.Context) (*Response, error)
- func (r *List) GroupBy(enum groupby.GroupBy) *List
- func (r *List) Header(key, value string) *List
- func (r *List) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r List) IsSuccess(ctx context.Context) (bool, error)
- func (r *List) MasterTimeout(v string) *List
- func (r *List) NodeId(v string) *List
- func (r *List) ParentTaskId(v string) *List
- func (r List) Perform(ctx context.Context) (*http.Response, error)
- func (r *List) Timeout(v string) *List
- func (r *List) WaitForCompletion(b bool) *List
- type NewList
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *List
Returns a list of tasks.
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/tasks.html
func (*List) Actions ¶
Actions Comma-separated list or wildcard expression of actions used to limit the request. API name: actions
func (*List) Detailed ¶
Detailed If `true`, the response includes detailed information about shard recoveries. API name: detailed
func (List) Do ¶
Do runs the request through the transport, handle the response and returns a list.Response
func (*List) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (List) IsSuccess ¶
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (*List) MasterTimeout ¶
MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
func (*List) NodeId ¶
NodeId Comma-separated list of node IDs or names used to limit returned information. API name: node_id
func (*List) ParentTaskId ¶
ParentTaskId Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. API name: parent_task_id
func (List) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*List) Timeout ¶
Timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout
func (*List) WaitForCompletion ¶
WaitForCompletion If `true`, the request blocks until the operation is complete. API name: wait_for_completion
type NewList ¶
type NewList func() *List
NewList type alias for index.
func NewListFunc ¶
func NewListFunc(tp elastictransport.Interface) NewList
NewListFunc returns a new instance of List with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶
type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the // default). Nodes map[string]types.NodeTasks `json:"nodes,omitempty"` TaskFailures []types.TaskFailure `json:"task_failures,omitempty"` // Tasks Either a flat list of tasks if `group_by` was set to `none`, or grouped by // parents if // `group_by` was set to `parents`. Tasks types.TaskInfos `json:"tasks,omitempty"` }