Documentation
¶
Overview ¶
Mount a snapshot. Mount a snapshot as a searchable snapshot index. Do not use this API for snapshots managed by index lifecycle management (ILM). Manually mounting ILM-managed snapshots can interfere with ILM processes.
Index ¶
- Variables
- type Mount
- func (r Mount) Do(providedCtx context.Context) (*Response, error)
- func (r *Mount) ErrorTrace(errortrace bool) *Mount
- func (r *Mount) FilterPath(filterpaths ...string) *Mount
- func (r *Mount) Header(key, value string) *Mount
- func (r *Mount) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Mount) Human(human bool) *Mount
- func (r *Mount) IgnoreIndexSettings(ignoreindexsettings ...string) *Mount
- func (r *Mount) Index(indexname string) *Mount
- func (r *Mount) IndexSettings(indexsettings map[string]json.RawMessage) *Mount
- func (r *Mount) MasterTimeout(duration string) *Mount
- func (r Mount) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Mount) Pretty(pretty bool) *Mount
- func (r *Mount) Raw(raw io.Reader) *Mount
- func (r *Mount) RenamedIndex(indexname string) *Mount
- func (r *Mount) Request(req *Request) *Mount
- func (r *Mount) Storage(storage string) *Mount
- func (r *Mount) WaitForCompletion(waitforcompletion bool) *Mount
- type NewMount
- type Request
- 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 Mount ¶
type Mount struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Mount
Mount a snapshot. Mount a snapshot as a searchable snapshot index. Do not use this API for snapshots managed by index lifecycle management (ILM). Manually mounting ILM-managed snapshots can interfere with ILM processes.
func (Mount) Do ¶
Do runs the request through the transport, handle the response and returns a mount.Response
func (*Mount) 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 (*Mount) 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 (*Mount) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Mount) 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 (*Mount) IgnoreIndexSettings ¶ added in v8.9.0
IgnoreIndexSettings The names of settings that should be removed from the index when it is mounted. API name: ignore_index_settings
func (*Mount) Index ¶ added in v8.9.0
Index The name of the index contained in the snapshot whose data is to be mounted. If no `renamed_index` is specified, this name will also be used to create the new index. API name: index
func (*Mount) IndexSettings ¶ added in v8.9.0
func (r *Mount) IndexSettings(indexsettings map[string]json.RawMessage) *Mount
IndexSettings The settings that should be added to the index when it is mounted. API name: index_settings
func (*Mount) MasterTimeout ¶
MasterTimeout The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to `-1`. API name: master_timeout
func (Mount) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Mount) 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 (*Mount) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Mount) RenamedIndex ¶ added in v8.9.0
RenamedIndex The name of the index that will be created. API name: renamed_index
func (*Mount) Storage ¶
Storage The mount option for the searchable snapshot index. API name: storage
func (*Mount) WaitForCompletion ¶
WaitForCompletion If true, the request blocks until the operation is complete. API name: wait_for_completion
type NewMount ¶
NewMount type alias for index.
func NewMountFunc ¶
func NewMountFunc(tp elastictransport.Interface) NewMount
NewMountFunc returns a new instance of Mount with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // IgnoreIndexSettings The names of settings that should be removed from the index when it is // mounted. IgnoreIndexSettings []string `json:"ignore_index_settings,omitempty"` // Index The name of the index contained in the snapshot whose data is to be mounted. // If no `renamed_index` is specified, this name will also be used to create the // new index. Index string `json:"index"` // IndexSettings The settings that should be added to the index when it is mounted. IndexSettings map[string]json.RawMessage `json:"index_settings,omitempty"` // RenamedIndex The name of the index that will be created. RenamedIndex *string `json:"renamed_index,omitempty"` }
Request holds the request body struct for the package mount
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure
func (*Request) UnmarshalJSON ¶ added in v8.12.1
type Response ¶ added in v8.7.0
type Response struct {
Snapshot types.MountedSnapshot `json:"snapshot"`
}
Response holds the response body struct for the package mount