Documentation ¶
Overview ¶
Returns all snapshots in a specific repository.
Index ¶
- Variables
- type NewSnapshots
- type Response
- type Snapshots
- func (r Snapshots) Do(providedCtx context.Context) (Response, error)
- func (r *Snapshots) ErrorTrace(errortrace bool) *Snapshots
- func (r *Snapshots) FilterPath(filterpaths ...string) *Snapshots
- func (r *Snapshots) Format(format string) *Snapshots
- func (r *Snapshots) H(names ...string) *Snapshots
- func (r *Snapshots) Header(key, value string) *Snapshots
- func (r *Snapshots) Help(help bool) *Snapshots
- func (r *Snapshots) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Snapshots) Human(human bool) *Snapshots
- func (r *Snapshots) IgnoreUnavailable(ignoreunavailable bool) *Snapshots
- func (r Snapshots) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *Snapshots) Local(local bool) *Snapshots
- func (r *Snapshots) MasterTimeout(duration string) *Snapshots
- func (r Snapshots) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Snapshots) Pretty(pretty bool) *Snapshots
- func (r *Snapshots) Repository(repository string) *Snapshots
- func (r *Snapshots) S(names ...string) *Snapshots
- func (r *Snapshots) V(v bool) *Snapshots
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 NewSnapshots ¶
type NewSnapshots func() *Snapshots
NewSnapshots type alias for index.
func NewSnapshotsFunc ¶
func NewSnapshotsFunc(tp elastictransport.Interface) NewSnapshots
NewSnapshotsFunc returns a new instance of Snapshots 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 []types.SnapshotsRecord
type Snapshots ¶
type Snapshots struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Snapshots
Returns all snapshots in a specific repository.
https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html
func (Snapshots) Do ¶
Do runs the request through the transport, handle the response and returns a snapshots.Response
func (*Snapshots) 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 (*Snapshots) 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 (*Snapshots) Format ¶ added in v8.14.0
Format Specifies the format to return the columnar data in, can be set to `text`, `json`, `cbor`, `yaml`, or `smile`. API name: format
func (*Snapshots) H ¶ added in v8.14.0
H List of columns to appear in the response. Supports simple wildcards. API name: h
func (*Snapshots) Help ¶ added in v8.14.0
Help When set to `true` will output available columns. This option can't be combined with any other query string option. API name: help
func (*Snapshots) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Snapshots) 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 (*Snapshots) IgnoreUnavailable ¶
IgnoreUnavailable If `true`, the response does not include information from unavailable snapshots. API name: ignore_unavailable
func (Snapshots) 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.
func (*Snapshots) Local ¶ added in v8.14.0
Local If `true`, the request computes the list of selected nodes from the local cluster state. If `false` the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node. API name: local
func (*Snapshots) MasterTimeout ¶ added in v8.14.0
MasterTimeout Period to wait for a connection to the master node. API name: master_timeout
func (Snapshots) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Snapshots) Pretty ¶ added in v8.14.0
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*Snapshots) Repository ¶
Repository A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, Elasticsearch returns an error. API Name: repository