flushjob

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

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

Do runs the http.Request through the provided transport.

func (*FlushJob) End

func (r *FlushJob) End(value 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) Raw

func (r *FlushJob) Raw(raw json.RawMessage) *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(value 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(value 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/7f49eec1f23a5ae155001c058b3196d85981d5c2/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 (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