updatesettings

package
v8.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Overview

Update Watcher index settings. Update settings for the Watcher internal index (`.watches`). Only a subset of settings can be modified. This includes `index.auto_expand_replicas`, `index.number_of_replicas`, `index.routing.allocation.exclude.*`, `index.routing.allocation.include.*` and `index.routing.allocation.require.*`. Modification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the Watcher shards must always be in the `data_content` tier.

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 NewUpdateSettings

type NewUpdateSettings func() *UpdateSettings

NewUpdateSettings type alias for index.

func NewUpdateSettingsFunc

func NewUpdateSettingsFunc(tp elastictransport.Interface) NewUpdateSettings

NewUpdateSettingsFunc returns a new instance of UpdateSettings with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request added in v8.18.0

type Request struct {
	IndexAutoExpandReplicas *string `json:"index.auto_expand_replicas,omitempty"`
	IndexNumberOfReplicas   *int    `json:"index.number_of_replicas,omitempty"`
}

Request holds the request body struct for the package updatesettings

https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61

func NewRequest added in v8.18.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.18.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response added in v8.18.0

type Response struct {
	Acknowledged bool `json:"acknowledged"`
}

Response holds the response body struct for the package updatesettings

https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24

func NewResponse added in v8.18.0

func NewResponse() *Response

NewResponse returns a Response

type UpdateSettings

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

func New

Update Watcher index settings. Update settings for the Watcher internal index (`.watches`). Only a subset of settings can be modified. This includes `index.auto_expand_replicas`, `index.number_of_replicas`, `index.routing.allocation.exclude.*`, `index.routing.allocation.include.*` and `index.routing.allocation.require.*`. Modification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the Watcher shards must always be in the `data_content` tier.

https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-update-settings

func (UpdateSettings) Do added in v8.9.0

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

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

func (*UpdateSettings) ErrorTrace added in v8.18.0

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

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

func (*UpdateSettings) FilterPath added in v8.18.0

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

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

func (*UpdateSettings) Header

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

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

func (*UpdateSettings) HttpRequest

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

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

func (*UpdateSettings) Human added in v8.18.0

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

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 (*UpdateSettings) IndexAutoExpandReplicas added in v8.18.0

func (r *UpdateSettings) IndexAutoExpandReplicas(indexautoexpandreplicas string) *UpdateSettings

API name: index.auto_expand_replicas

func (*UpdateSettings) IndexNumberOfReplicas added in v8.18.0

func (r *UpdateSettings) IndexNumberOfReplicas(indexnumberofreplicas int) *UpdateSettings

API name: index.number_of_replicas

func (*UpdateSettings) MasterTimeout added in v8.18.0

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

MasterTimeout The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout

func (UpdateSettings) Perform

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

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

func (*UpdateSettings) Pretty added in v8.18.0

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

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

func (*UpdateSettings) Raw added in v8.18.0

func (r *UpdateSettings) Raw(raw io.Reader) *UpdateSettings

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*UpdateSettings) Request added in v8.18.0

func (r *UpdateSettings) Request(req *Request) *UpdateSettings

Request allows to set the request property with the appropriate payload.

func (*UpdateSettings) Timeout added in v8.18.0

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

Timeout The 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

Jump to

Keyboard shortcuts

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