mount

package
v8.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Overview

Mount a snapshot as a searchable index.

Index

Constants

This section is empty.

Variables

View Source
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

func (r Mount) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a mount.Response

func (*Mount) Header

func (r *Mount) Header(key, value string) *Mount

Header set a key, value pair in the Mount headers map.

func (*Mount) HttpRequest

func (r *Mount) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*Mount) IgnoreIndexSettings added in v8.9.0

func (r *Mount) IgnoreIndexSettings(ignoreindexsettings ...string) *Mount

API name: ignore_index_settings

func (*Mount) Index added in v8.9.0

func (r *Mount) Index(indexname string) *Mount

API name: index

func (*Mount) IndexSettings added in v8.9.0

func (r *Mount) IndexSettings(indexsettings map[string]json.RawMessage) *Mount

API name: index_settings

func (*Mount) MasterTimeout

func (r *Mount) MasterTimeout(duration string) *Mount

MasterTimeout Explicit operation timeout for connection to master node API name: master_timeout

func (Mount) Perform added in v8.7.0

func (r Mount) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*Mount) Raw

func (r *Mount) Raw(raw io.Reader) *Mount

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

func (r *Mount) RenamedIndex(indexname string) *Mount

API name: renamed_index

func (*Mount) Request

func (r *Mount) Request(req *Request) *Mount

Request allows to set the request property with the appropriate payload.

func (*Mount) Storage

func (r *Mount) Storage(storage string) *Mount

Storage Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` API name: storage

func (*Mount) WaitForCompletion

func (r *Mount) WaitForCompletion(waitforcompletion bool) *Mount

WaitForCompletion Should this request wait until the operation has completed before returning API name: wait_for_completion

type NewMount

type NewMount func(repository, snapshot string) *Mount

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

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L49

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON added in v8.12.1

func (s *Request) UnmarshalJSON(data []byte) error

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

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL