Documentation ¶
Overview ¶
Mount a snapshot as a searchable index.
Index ¶
- Variables
- type Mount
- func (r Mount) Do(providedCtx context.Context) (*Response, error)
- func (r *Mount) Header(key, value string) *Mount
- func (r *Mount) HttpRequest(ctx context.Context) (*http.Request, error)
- 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) 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 (Mount) Do ¶
Do runs the request through the transport, handle the response and returns a mount.Response
func (*Mount) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Mount) IgnoreIndexSettings ¶
API name: ignore_index_settings
func (*Mount) IndexSettings ¶
func (r *Mount) IndexSettings(indexsettings map[string]json.RawMessage) *Mount
API name: index_settings
func (*Mount) MasterTimeout ¶
MasterTimeout Explicit operation timeout for connection to master node API name: master_timeout
func (Mount) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
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 ¶
API name: renamed_index
func (*Mount) Storage ¶
Storage Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` API name: storage
func (*Mount) WaitForCompletion ¶
WaitForCompletion Should this request wait until the operation has completed before returning 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 []string `json:"ignore_index_settings,omitempty"` Index string `json:"index"` IndexSettings map[string]json.RawMessage `json:"index_settings,omitempty"` RenamedIndex *string `json:"renamed_index,omitempty"` }
Request holds the request body struct for the package mount
func (*Request) UnmarshalJSON ¶
type Response ¶
type Response struct {
Snapshot types.MountedSnapshot `json:"snapshot"`
}
Response holds the response body struct for the package mount