mount

package
v8.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

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(ctx context.Context) (*http.Response, error)

Do runs the http.Request through the provided transport.

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) MasterTimeout

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

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

func (*Mount) Raw

func (r *Mount) Raw(raw json.RawMessage) *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) Repository

func (r *Mount) Repository(v string) *Mount

Repository The name of the repository containing the snapshot of the index to mount API Name: repository

func (*Mount) Request

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

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

func (*Mount) Snapshot

func (r *Mount) Snapshot(v string) *Mount

Snapshot The name of the snapshot of the index to mount API Name: snapshot

func (*Mount) Storage

func (r *Mount) Storage(value 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(b 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 types.IndexName `json:"index"`

	IndexSettings map[string]interface{} `json:"index_settings,omitempty"`

	RenamedIndex *types.IndexName `json:"renamed_index,omitempty"`
}

Request holds the request body struct for the package mount

https://github.com/elastic/elasticsearch-specification/blob/4316fc1aa18bb04678b156f23b22c9d3f996f9c9/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L50

type RequestBuilder

type RequestBuilder struct {
	// contains filtered or unexported fields
}

RequestBuilder is the builder API for the mount.Request

func NewRequestBuilder

func NewRequestBuilder() *RequestBuilder

NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder

func (*RequestBuilder) Build

func (rb *RequestBuilder) Build() *Request

Build finalize the chain and returns the Request struct.

func (*RequestBuilder) FromJSON

func (rb *RequestBuilder) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*RequestBuilder) IgnoreIndexSettings

func (rb *RequestBuilder) IgnoreIndexSettings(ignore_index_settings ...string) *RequestBuilder

func (*RequestBuilder) Index

func (rb *RequestBuilder) Index(index types.IndexName) *RequestBuilder

func (*RequestBuilder) IndexSettings

func (rb *RequestBuilder) IndexSettings(value map[string]interface{}) *RequestBuilder

func (*RequestBuilder) RenamedIndex

func (rb *RequestBuilder) RenamedIndex(renamedindex types.IndexName) *RequestBuilder

Jump to

Keyboard shortcuts

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