tasks

package
v0.0.2 Latest Latest
Warning

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

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

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

type Response []types.TasksRecord

func NewResponse

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(v string) *Tasks

Actions A comma-separated list of actions that should be returned. Leave empty to return all. API name: actions

func (*Tasks) Detailed

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

Detailed Return detailed task information (default: false) 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(v string) *Tasks

API name: node_id

func (*Tasks) ParentTask

func (r *Tasks) ParentTask(v string) *Tasks

API name: parent_task

func (Tasks) Perform

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