globalcheckpoints

package
v8.14.0 Latest Latest
Warning

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

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

Documentation

Overview

Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.

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 GlobalCheckpoints

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

func New

Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.

https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html

func (*GlobalCheckpoints) Checkpoints

func (r *GlobalCheckpoints) Checkpoints(checkpoints ...int64) *GlobalCheckpoints

Checkpoints A comma separated list of previous global checkpoints. When used in combination with `wait_for_advance`, the API will only return once the global checkpoints advances past the checkpoints. Providing an empty list will cause Elasticsearch to immediately return the current global checkpoints. API name: checkpoints

func (GlobalCheckpoints) Do

func (r GlobalCheckpoints) Do(providedCtx context.Context) (*Response, error)

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

func (*GlobalCheckpoints) ErrorTrace added in v8.14.0

func (r *GlobalCheckpoints) ErrorTrace(errortrace bool) *GlobalCheckpoints

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*GlobalCheckpoints) FilterPath added in v8.14.0

func (r *GlobalCheckpoints) FilterPath(filterpaths ...string) *GlobalCheckpoints

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*GlobalCheckpoints) Header

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

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

func (*GlobalCheckpoints) HttpRequest

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

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

func (*GlobalCheckpoints) Human added in v8.14.0

func (r *GlobalCheckpoints) Human(human bool) *GlobalCheckpoints

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 (GlobalCheckpoints) IsSuccess

func (r GlobalCheckpoints) 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 (GlobalCheckpoints) Perform added in v8.7.0

func (r GlobalCheckpoints) Perform(providedCtx context.Context) (*http.Response, error)

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

func (*GlobalCheckpoints) Pretty added in v8.14.0

func (r *GlobalCheckpoints) Pretty(pretty bool) *GlobalCheckpoints

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*GlobalCheckpoints) Timeout

func (r *GlobalCheckpoints) Timeout(duration string) *GlobalCheckpoints

Timeout Period to wait for a global checkpoints to advance past `checkpoints`. API name: timeout

func (*GlobalCheckpoints) WaitForAdvance

func (r *GlobalCheckpoints) WaitForAdvance(waitforadvance bool) *GlobalCheckpoints

WaitForAdvance A boolean value which controls whether to wait (until the timeout) for the global checkpoints to advance past the provided `checkpoints`. API name: wait_for_advance

func (*GlobalCheckpoints) WaitForIndex

func (r *GlobalCheckpoints) WaitForIndex(waitforindex bool) *GlobalCheckpoints

WaitForIndex A boolean value which controls whether to wait (until the timeout) for the target index to exist and all primary shards be active. Can only be true when `wait_for_advance` is true. API name: wait_for_index

type NewGlobalCheckpoints

type NewGlobalCheckpoints func(index string) *GlobalCheckpoints

NewGlobalCheckpoints type alias for index.

func NewGlobalCheckpointsFunc

func NewGlobalCheckpointsFunc(tp elastictransport.Interface) NewGlobalCheckpoints

NewGlobalCheckpointsFunc returns a new instance of GlobalCheckpoints 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 {
	GlobalCheckpoints []int64 `json:"global_checkpoints"`
	TimedOut          bool    `json:"timed_out"`
}

Response holds the response body struct for the package globalcheckpoints

https://github.com/elastic/elasticsearch-specification/blob/07bf82537a186562d8699685e3704ea338b268ef/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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