simulatetemplate

package
v8.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Simulate resolving the given template name or body

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 NewSimulateTemplate

type NewSimulateTemplate func() *SimulateTemplate

NewSimulateTemplate type alias for index.

func NewSimulateTemplateFunc

func NewSimulateTemplateFunc(tp elastictransport.Interface) NewSimulateTemplate

NewSimulateTemplateFunc returns a new instance of SimulateTemplate with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type SimulateTemplate

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

func (*SimulateTemplate) Create

func (r *SimulateTemplate) Create(b bool) *SimulateTemplate

Create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. API name: create

func (SimulateTemplate) Do

Do runs the http.Request through the provided transport.

func (*SimulateTemplate) Header

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

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

func (*SimulateTemplate) HttpRequest

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

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

func (*SimulateTemplate) MasterTimeout

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

MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout

func (*SimulateTemplate) Name

Name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body. API Name: name

func (*SimulateTemplate) 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 (*SimulateTemplate) Request

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

Jump to

Keyboard shortcuts

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