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 ¶
- Variables
- type NewUpdateSettings
- type Request
- type Response
- type UpdateSettings
- func (r UpdateSettings) Do(providedCtx context.Context) (*Response, error)
- func (r *UpdateSettings) ErrorTrace(errortrace bool) *UpdateSettings
- func (r *UpdateSettings) FilterPath(filterpaths ...string) *UpdateSettings
- func (r *UpdateSettings) Header(key, value string) *UpdateSettings
- func (r *UpdateSettings) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateSettings) Human(human bool) *UpdateSettings
- func (r *UpdateSettings) IndexAutoExpandReplicas(indexautoexpandreplicas string) *UpdateSettings
- func (r *UpdateSettings) IndexNumberOfReplicas(indexnumberofreplicas int) *UpdateSettings
- func (r *UpdateSettings) MasterTimeout(duration string) *UpdateSettings
- func (r UpdateSettings) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *UpdateSettings) Pretty(pretty bool) *UpdateSettings
- func (r *UpdateSettings) Raw(raw io.Reader) *UpdateSettings
- func (r *UpdateSettings) Request(req *Request) *UpdateSettings
- func (r *UpdateSettings) Timeout(duration string) *UpdateSettings
Constants ¶
This section is empty.
Variables ¶
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
type Response ¶ added in v8.18.0
type Response struct {
Acknowledged bool `json:"acknowledged"`
}
Response holds the response body struct for the package updatesettings
type UpdateSettings ¶
type UpdateSettings struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateSettings
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 ¶
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 ¶
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