state

package
v8.13.1 Latest Latest
Warning

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

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

Documentation

Overview

Returns a comprehensive information about the state of 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 NewState

type NewState func() *State

NewState type alias for index.

func NewStateFunc

func NewStateFunc(tp elastictransport.Interface) NewState

NewStateFunc returns a new instance of State 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 = json.RawMessage

func NewResponse added in v8.7.1

func NewResponse() *Response

type State

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

func New

Returns a comprehensive information about the state of the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html

func (*State) AllowNoIndices

func (r *State) AllowNoIndices(allownoindices bool) *State

AllowNoIndices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) API name: allow_no_indices

func (State) Do

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

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

func (*State) ExpandWildcards

func (r *State) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *State

ExpandWildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. API name: expand_wildcards

func (*State) FlatSettings

func (r *State) FlatSettings(flatsettings bool) *State

FlatSettings Return settings in flat format (default: false) API name: flat_settings

func (*State) Header

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

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

func (*State) HttpRequest

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

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

func (*State) IgnoreUnavailable

func (r *State) IgnoreUnavailable(ignoreunavailable bool) *State

IgnoreUnavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) API name: ignore_unavailable

func (*State) Index

func (r *State) Index(index string) *State

Index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices API Name: index

func (State) IsSuccess

func (r State) 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 (*State) Local

func (r *State) Local(local bool) *State

Local Return local information, do not retrieve the state from master node (default: false) API name: local

func (*State) MasterTimeout

func (r *State) MasterTimeout(duration string) *State

MasterTimeout Specify timeout for connection to master API name: master_timeout

func (*State) Metric

func (r *State) Metric(metric string) *State

Metric Limit the information returned to the specified metrics API Name: metric

func (State) Perform added in v8.7.0

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

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

func (*State) WaitForMetadataVersion

func (r *State) WaitForMetadataVersion(versionnumber string) *State

WaitForMetadataVersion Wait for the metadata version to be equal or greater than the specified metadata version API name: wait_for_metadata_version

func (*State) WaitForTimeout

func (r *State) WaitForTimeout(duration string) *State

WaitForTimeout The maximum time to wait for wait_for_metadata_version before timing out API name: wait_for_timeout

Jump to

Keyboard shortcuts

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