flushjob

package
v8.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Forces any buffered data to be processed by the job.

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 FlushJob

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

func (*FlushJob) AdvanceTime

func (r *FlushJob) AdvanceTime(v string) *FlushJob

AdvanceTime Specifies to advance to a particular time value. Results are generated and the model is updated for data from the specified time interval. API name: advance_time

func (*FlushJob) CalcInterim

func (r *FlushJob) CalcInterim(b bool) *FlushJob

CalcInterim If true, calculates the interim results for the most recent bucket or all buckets within the latency period. API name: calc_interim

func (FlushJob) Do

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

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

func (*FlushJob) End

func (r *FlushJob) End(v string) *FlushJob

End When used in conjunction with `calc_interim` and `start`, specifies the range of buckets on which to calculate interim results. API name: end

func (*FlushJob) Header

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

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

func (*FlushJob) HttpRequest

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

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

func (*FlushJob) JobId

func (r *FlushJob) JobId(v string) *FlushJob

JobId Identifier for the anomaly detection job. API Name: jobid

func (FlushJob) Perform added in v8.7.0

func (r FlushJob) Perform(ctx context.Context) (*http.Response, error)

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

func (*FlushJob) Raw

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

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

func (*FlushJob) Request

func (r *FlushJob) Request(req *Request) *FlushJob

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

func (*FlushJob) SkipTime

func (r *FlushJob) SkipTime(v string) *FlushJob

SkipTime Specifies to skip to a particular time value. Results are not generated and the model is not updated for data from the specified time interval. API name: skip_time

func (*FlushJob) Start

func (r *FlushJob) Start(v string) *FlushJob

Start When used in conjunction with `calc_interim`, specifies the range of buckets on which to calculate interim results. API name: start

type NewFlushJob

type NewFlushJob func(jobid string) *FlushJob

NewFlushJob type alias for index.

func NewFlushJobFunc

func NewFlushJobFunc(tp elastictransport.Interface) NewFlushJob

NewFlushJobFunc returns a new instance of FlushJob 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 {

	// AdvanceTime Refer to the description for the `advance_time` query parameter.
	AdvanceTime types.DateTime `json:"advance_time,omitempty"`
	// CalcInterim Refer to the description for the `calc_interim` query parameter.
	CalcInterim *bool `json:"calc_interim,omitempty"`
	// End Refer to the description for the `end` query parameter.
	End types.DateTime `json:"end,omitempty"`
	// SkipTime Refer to the description for the `skip_time` query parameter.
	SkipTime types.DateTime `json:"skip_time,omitempty"`
	// Start Refer to the description for the `start` query parameter.
	Start types.DateTime `json:"start,omitempty"`
}

Request holds the request body struct for the package flushjob

https://github.com/elastic/elasticsearch-specification/blob/a0da620389f06553c0727f98f95e40dbb564fcca/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L99

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

type Response added in v8.7.0

type Response struct {
	Flushed bool `json:"flushed"`
	// LastFinalizedBucketEnd Provides the timestamp (in milliseconds since the epoch) of the end of
	// the last bucket that was processed.
	LastFinalizedBucketEnd *int `json:"last_finalized_bucket_end,omitempty"`
}

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