globalcheckpoints

package
v8.8.2 Latest Latest
Warning

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

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

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

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

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) Index

Index A single index or index alias that resolves to a single index. API Name: index

func (GlobalCheckpoints) IsSuccess

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

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

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

func (*GlobalCheckpoints) Timeout

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

func (*GlobalCheckpoints) WaitForAdvance

func (r *GlobalCheckpoints) WaitForAdvance(b 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(b 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"`
}

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