putpipeline

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: 10 Imported by: 4

Documentation

Overview

Creates or updates a pipeline.

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 NewPutPipeline

type NewPutPipeline func(id string) *PutPipeline

NewPutPipeline type alias for index.

func NewPutPipelineFunc

func NewPutPipelineFunc(tp elastictransport.Interface) NewPutPipeline

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

type PutPipeline

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

func (PutPipeline) Do

func (r PutPipeline) Do(ctx context.Context) (*http.Response, error)

Do runs the http.Request through the provided transport.

func (*PutPipeline) Header

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

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

func (*PutPipeline) HttpRequest

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

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

func (*PutPipeline) Id

func (r *PutPipeline) Id(v string) *PutPipeline

Id ID of the ingest pipeline to create or update. API Name: id

func (*PutPipeline) IfVersion

func (r *PutPipeline) IfVersion(value string) *PutPipeline

IfVersion Required version for optimistic concurrency control for pipeline updates API name: if_version

func (*PutPipeline) MasterTimeout

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

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 (*PutPipeline) Raw

func (r *PutPipeline) Raw(raw json.RawMessage) *PutPipeline

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*PutPipeline) Request

func (r *PutPipeline) Request(req *Request) *PutPipeline

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

func (*PutPipeline) Timeout

func (r *PutPipeline) Timeout(value string) *PutPipeline

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

type Request

type Request struct {

	// Description Description of the ingest pipeline.
	Description *string `json:"description,omitempty"`
	// Meta_ Optional metadata about the ingest pipeline. May have any contents. This map
	// is not automatically generated by Elasticsearch.
	Meta_ map[string]interface{} `json:"_meta,omitempty"`
	// OnFailure Processors to run immediately after a processor failure. Each processor
	// supports a processor-level `on_failure` value. If a processor without an
	// `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as
	// a fallback. The processors in this parameter run sequentially in the order
	// specified. Elasticsearch will not attempt to run the pipeline's remaining
	// processors.
	OnFailure []types.ProcessorContainer `json:"on_failure,omitempty"`
	// Processors Processors used to perform transformations on documents before indexing.
	// Processors run sequentially in the order specified.
	Processors []types.ProcessorContainer `json:"processors,omitempty"`
	// Version Version number used by external systems to track ingest pipelines. This
	// parameter is intended for external systems only. Elasticsearch does not use
	// or validate pipeline version numbers.
	Version *int64 `json:"version,omitempty"`
}

Request holds the request body struct for the package putpipeline

https://github.com/elastic/elasticsearch-specification/blob/7f49eec1f23a5ae155001c058b3196d85981d5c2/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L74

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

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

FromJSON allows to load an arbitrary json into the request structure

Jump to

Keyboard shortcuts

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