Documentation
¶
Overview ¶
Acknowledge a watch. Acknowledging a watch enables you to manually throttle the execution of the watch's actions.
The acknowledgement state of an action is stored in the `status.actions.<id>.ack.state` structure.
IMPORTANT: If the specified watch is currently being executed, this API will return an error The reason for this behavior is to prevent overwriting the watch status from a watch execution.
Acknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`. This happens when the condition of the watch is not met (the condition evaluates to false). To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.
Index ¶
- Variables
- type AckWatch
- func (r *AckWatch) ActionId(actionid string) *AckWatch
- func (r AckWatch) Do(providedCtx context.Context) (*Response, error)
- func (r *AckWatch) ErrorTrace(errortrace bool) *AckWatch
- func (r *AckWatch) FilterPath(filterpaths ...string) *AckWatch
- func (r *AckWatch) Header(key, value string) *AckWatch
- func (r *AckWatch) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *AckWatch) Human(human bool) *AckWatch
- func (r AckWatch) IsSuccess(providedCtx context.Context) (bool, error)
- func (r AckWatch) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *AckWatch) Pretty(pretty bool) *AckWatch
- type NewAckWatch
- type Response
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 AckWatch ¶
type AckWatch struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *AckWatch
Acknowledge a watch. Acknowledging a watch enables you to manually throttle the execution of the watch's actions.
The acknowledgement state of an action is stored in the `status.actions.<id>.ack.state` structure.
IMPORTANT: If the specified watch is currently being executed, this API will return an error The reason for this behavior is to prevent overwriting the watch status from a watch execution.
Acknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`. This happens when the condition of the watch is not met (the condition evaluates to false). To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch
func (*AckWatch) ActionId ¶
ActionId A comma-separated list of the action identifiers to acknowledge. If you omit this parameter, all of the actions of the watch are acknowledged. API Name: actionid
func (AckWatch) Do ¶
Do runs the request through the transport, handle the response and returns a ackwatch.Response
func (*AckWatch) ErrorTrace ¶
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*AckWatch) FilterPath ¶
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*AckWatch) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*AckWatch) Human ¶
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"exists_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 (AckWatch) IsSuccess ¶
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.
type NewAckWatch ¶
NewAckWatch type alias for index.
func NewAckWatchFunc ¶
func NewAckWatchFunc(tp elastictransport.Interface) NewAckWatch
NewAckWatchFunc returns a new instance of AckWatch with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶
type Response struct {
Status types.WatchStatus `json:"status"`
}
Response holds the response body struct for the package ackwatch