state

package
v8.4.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

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 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/{branch}/cluster-state.html

func (*State) AllowNoIndices

func (r *State) AllowNoIndices(b 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(ctx context.Context) (*http.Response, error)

Do runs the http.Request through the provided transport.

func (*State) ExpandWildcards

func (r *State) ExpandWildcards(value string) *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(b 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(b 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(v 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(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 (*State) Local

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

MasterTimeout Specify timeout for connection to master API name: master_timeout

func (*State) Metric

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

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

func (*State) WaitForMetadataVersion

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