list

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Returns a list of tasks.

Index

Constants

This section is empty.

Variables

View Source
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 (*List) Actions

func (r *List) Actions(v string) *List

Actions Comma-separated list or wildcard expression of actions used to limit the request. API name: actions

func (*List) Detailed

func (r *List) Detailed(b bool) *List

Detailed If `true`, the response includes detailed information about shard recoveries. API name: detailed

func (List) Do

func (r List) Do(ctx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a list.Response

func (*List) GroupBy

func (r *List) GroupBy(enum groupby.GroupBy) *List

GroupBy Key used to group tasks in the response. API name: group_by

func (*List) Header

func (r *List) Header(key, value string) *List

Header set a key, value pair in the List headers map.

func (*List) HttpRequest

func (r *List) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (List) IsSuccess

func (r List) IsSuccess(ctx context.Context) (bool, error)

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

func (r *List) MasterTimeout(v string) *List

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

func (r *List) NodeId(v string) *List

NodeId Comma-separated list of node IDs or names used to limit returned information. API name: node_id

func (*List) ParentTaskId

func (r *List) ParentTaskId(v string) *List

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

func (r List) Perform(ctx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*List) Timeout

func (r *List) Timeout(v string) *List

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

func (r *List) WaitForCompletion(b bool) *List

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"`
}

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

func (*Response) UnmarshalJSON

func (s *Response) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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