Documentation ¶
Overview ¶
Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
Index ¶
- Variables
- type GetStats
- func (r GetStats) Do(providedCtx context.Context) (*Response, error)
- func (r *GetStats) ErrorTrace(errortrace bool) *GetStats
- func (r *GetStats) FilterPath(filterpaths ...string) *GetStats
- func (r *GetStats) Header(key, value string) *GetStats
- func (r *GetStats) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetStats) Human(human bool) *GetStats
- func (r GetStats) IsSuccess(providedCtx context.Context) (bool, error)
- func (r GetStats) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetStats) Pretty(pretty bool) *GetStats
- type NewGetStats
- 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 GetStats ¶
type GetStats struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetStats
Returns global and policy-level statistics about actions taken by snapshot lifecycle management.
https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html
func (GetStats) Do ¶
Do runs the request through the transport, handle the response and returns a getstats.Response
func (*GetStats) ErrorTrace ¶ added in v8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetStats) FilterPath ¶ added in v8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetStats) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetStats) Human ¶ added in v8.14.0
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 (GetStats) 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 NewGetStats ¶
type NewGetStats func() *GetStats
NewGetStats type alias for index.
func NewGetStatsFunc ¶
func NewGetStatsFunc(tp elastictransport.Interface) NewGetStats
NewGetStatsFunc returns a new instance of GetStats 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 struct { PolicyStats []string `json:"policy_stats"` RetentionDeletionTime types.Duration `json:"retention_deletion_time"` RetentionDeletionTimeMillis int64 `json:"retention_deletion_time_millis"` RetentionFailed int64 `json:"retention_failed"` RetentionRuns int64 `json:"retention_runs"` RetentionTimedOut int64 `json:"retention_timed_out"` TotalSnapshotDeletionFailures int64 `json:"total_snapshot_deletion_failures"` TotalSnapshotsDeleted int64 `json:"total_snapshots_deleted"` TotalSnapshotsFailed int64 `json:"total_snapshots_failed"` TotalSnapshotsTaken int64 `json:"total_snapshots_taken"` }
Response holds the response body struct for the package getstats