Documentation
¶
Overview ¶
Get task information.
Get information about tasks currently running in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
Index ¶
- Variables
- type NewTasks
- type Response
- type Tasks
- func (r *Tasks) Actions(actions ...string) *Tasks
- func (r *Tasks) Detailed(detailed bool) *Tasks
- func (r Tasks) Do(providedCtx context.Context) (Response, error)
- func (r *Tasks) ErrorTrace(errortrace bool) *Tasks
- func (r *Tasks) FilterPath(filterpaths ...string) *Tasks
- func (r *Tasks) Format(format string) *Tasks
- func (r *Tasks) H(names ...string) *Tasks
- func (r *Tasks) Header(key, value string) *Tasks
- func (r *Tasks) Help(help bool) *Tasks
- func (r *Tasks) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Tasks) Human(human bool) *Tasks
- func (r Tasks) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *Tasks) Nodes(nodes ...string) *Tasks
- func (r *Tasks) ParentTaskId(parenttaskid string) *Tasks
- func (r Tasks) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Tasks) Pretty(pretty bool) *Tasks
- func (r *Tasks) S(names ...string) *Tasks
- func (r *Tasks) Time(time timeunit.TimeUnit) *Tasks
- func (r *Tasks) Timeout(duration string) *Tasks
- func (r *Tasks) V(v bool) *Tasks
- func (r *Tasks) WaitForCompletion(waitforcompletion bool) *Tasks
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 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
type Tasks ¶
type Tasks struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Tasks
Get task information.
Get information about tasks currently running in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-tasks.html
func (*Tasks) Actions ¶
Actions The task action names, which are used to limit the response. API name: actions
func (*Tasks) Detailed ¶
Detailed If `true`, the response includes detailed information about shard recoveries. API name: detailed
func (Tasks) Do ¶
Do runs the request through the transport, handle the response and returns a tasks.Response
func (*Tasks) ErrorTrace ¶ added in v8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*Tasks) FilterPath ¶ added in v8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*Tasks) Format ¶ added in v8.14.0
Format Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. API name: format
func (*Tasks) H ¶ added in v8.14.0
H List of columns to appear in the response. Supports simple wildcards. API name: h
func (*Tasks) Help ¶ added in v8.14.0
Help When set to `true` will output available columns. This option can't be combined with any other query string option. API name: help
func (*Tasks) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Tasks) Human ¶ added in v8.14.0
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (Tasks) 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 (*Tasks) Nodes ¶ added in v8.18.0
Nodes Unique node identifiers, which are used to limit the response. API name: nodes
func (*Tasks) ParentTaskId ¶ added in v8.10.0
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
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Tasks) Pretty ¶ added in v8.14.0
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*Tasks) S ¶ added in v8.14.0
S List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting `:asc` or `:desc` as a suffix to the column name. API name: s
func (*Tasks) Timeout ¶ added in v8.18.0
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 (*Tasks) WaitForCompletion ¶ added in v8.18.0
WaitForCompletion If `true`, the request blocks until the task has completed. API name: wait_for_completion