Documentation
¶
Overview ¶
Create or update a pipeline. Changes made using this API take effect immediately.
Index ¶
- Variables
- type NewPutPipeline
- type PutPipeline
- func (r *PutPipeline) Deprecated(deprecated bool) *PutPipeline
- func (r *PutPipeline) Description(description string) *PutPipeline
- func (r PutPipeline) Do(providedCtx context.Context) (*Response, error)
- func (r *PutPipeline) ErrorTrace(errortrace bool) *PutPipeline
- func (r *PutPipeline) FilterPath(filterpaths ...string) *PutPipeline
- func (r *PutPipeline) Header(key, value string) *PutPipeline
- func (r *PutPipeline) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutPipeline) Human(human bool) *PutPipeline
- func (r *PutPipeline) IfVersion(versionnumber string) *PutPipeline
- func (r *PutPipeline) MasterTimeout(duration string) *PutPipeline
- func (r *PutPipeline) Meta_(metadata types.MetadataVariant) *PutPipeline
- func (r *PutPipeline) OnFailure(onfailures ...types.ProcessorContainerVariant) *PutPipeline
- func (r PutPipeline) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PutPipeline) Pretty(pretty bool) *PutPipeline
- func (r *PutPipeline) Processors(processors ...types.ProcessorContainerVariant) *PutPipeline
- func (r *PutPipeline) Raw(raw io.Reader) *PutPipeline
- func (r *PutPipeline) Request(req *Request) *PutPipeline
- func (r *PutPipeline) Timeout(duration string) *PutPipeline
- func (r *PutPipeline) Version(versionnumber int64) *PutPipeline
- 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 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 New ¶
func New(tp elastictransport.Interface) *PutPipeline
Create or update a pipeline. Changes made using this API take effect immediately.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html
func (*PutPipeline) Deprecated ¶ added in v8.16.0
func (r *PutPipeline) Deprecated(deprecated bool) *PutPipeline
Marks this ingest pipeline as deprecated. When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. API name: deprecated
func (*PutPipeline) Description ¶ added in v8.9.0
func (r *PutPipeline) Description(description string) *PutPipeline
Description of the ingest pipeline. API name: description
func (PutPipeline) Do ¶
func (r PutPipeline) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a putpipeline.Response
func (*PutPipeline) ErrorTrace ¶ added in v8.14.0
func (r *PutPipeline) ErrorTrace(errortrace bool) *PutPipeline
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*PutPipeline) FilterPath ¶ added in v8.14.0
func (r *PutPipeline) FilterPath(filterpaths ...string) *PutPipeline
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutPipeline) Human ¶ added in v8.14.0
func (r *PutPipeline) Human(human bool) *PutPipeline
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*PutPipeline) IfVersion ¶
func (r *PutPipeline) IfVersion(versionnumber string) *PutPipeline
IfVersion Required version for optimistic concurrency control for pipeline updates API name: if_version
func (*PutPipeline) MasterTimeout ¶
func (r *PutPipeline) MasterTimeout(duration 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) Meta_ ¶ added in v8.9.0
func (r *PutPipeline) Meta_(metadata types.MetadataVariant) *PutPipeline
Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. API name: _meta
func (*PutPipeline) OnFailure ¶ added in v8.9.0
func (r *PutPipeline) OnFailure(onfailures ...types.ProcessorContainerVariant) *PutPipeline
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. API name: on_failure
func (PutPipeline) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutPipeline) Pretty ¶ added in v8.14.0
func (r *PutPipeline) Pretty(pretty bool) *PutPipeline
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*PutPipeline) Processors ¶ added in v8.9.0
func (r *PutPipeline) Processors(processors ...types.ProcessorContainerVariant) *PutPipeline
Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. API name: processors
func (*PutPipeline) Raw ¶
func (r *PutPipeline) Raw(raw io.Reader) *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(duration 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
func (*PutPipeline) Version ¶ added in v8.9.0
func (r *PutPipeline) Version(versionnumber int64) *PutPipeline
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. API name: version
type Request ¶
type Request struct { // Deprecated Marks this ingest pipeline as deprecated. // When a deprecated ingest pipeline is referenced as the default or final // pipeline when creating or updating a non-deprecated index template, // Elasticsearch will emit a deprecation warning. Deprecated *bool `json:"deprecated,omitempty"` // 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_ types.Metadata `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
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure