list

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 3

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(actions ...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(detailed bool) *List

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

func (List) Do

func (r List) Do(providedCtx 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(groupby 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(providedCtx 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(duration 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(nodeids ...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(id 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 added in v8.7.0

func (r List) Perform(providedCtx 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(duration 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(waitforcompletion 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 added in v8.7.0

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

Response holds the response body struct for the package list

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/tasks/list/ListTasksResponse.ts#L22-L24

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

func (*Response) UnmarshalJSON added in v8.7.0

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