tasks

package
v8.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Returns information about the tasks currently executing on one or more nodes in the cluster.

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 NewTasks

type NewTasks func() *Tasks

NewTasks type alias for index.

func NewTasksFunc

func NewTasksFunc(tp elastictransport.Interface) NewTasks

NewTasksFunc returns a new instance of Tasks 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 []types.TasksRecord

func NewResponse added in v8.7.0

func NewResponse() Response

NewResponse returns a Response

type Tasks

type Tasks struct {
	// contains filtered or unexported fields
}

func New

Returns information about the tasks currently executing on one or more nodes in the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/tasks.html

func (*Tasks) Actions

func (r *Tasks) Actions(actions ...string) *Tasks

Actions The task action names, which are used to limit the response. API name: actions

func (*Tasks) Detailed

func (r *Tasks) Detailed(detailed bool) *Tasks

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

func (Tasks) Do

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

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

func (*Tasks) Header

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

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

func (*Tasks) HttpRequest

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

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

func (Tasks) IsSuccess

func (r Tasks) 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 (*Tasks) NodeId

func (r *Tasks) NodeId(nodeids ...string) *Tasks

NodeId Unique node identifiers, which are used to limit the response. API name: node_id

func (*Tasks) ParentTaskId added in v8.10.0

func (r *Tasks) ParentTaskId(parenttaskid string) *Tasks

ParentTaskId The parent task identifier, which is used to limit the response. API name: parent_task_id

func (Tasks) Perform added in v8.7.0

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

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

Jump to

Keyboard shortcuts

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