flushjob

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

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(datetime types.DateTime) *FlushJob

AdvanceTime Refer to the description for the `advance_time` query parameter. API name: advance_time

func (*FlushJob) CalcInterim

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

CalcInterim Refer to the description for the `calc_interim` query parameter. API name: calc_interim

func (FlushJob) Do

func (r FlushJob) Do(providedCtx 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(datetime types.DateTime) *FlushJob

End Refer to the description for the `end` query parameter. 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) Perform added in v8.7.0

func (r FlushJob) Perform(providedCtx 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(datetime types.DateTime) *FlushJob

SkipTime Refer to the description for the `skip_time` query parameter. API name: skip_time

func (*FlushJob) Start

func (r *FlushJob) Start(datetime types.DateTime) *FlushJob

Start Refer to the description for the `start` query parameter. 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/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/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

func (*Request) UnmarshalJSON added in v8.12.1

func (s *Request) UnmarshalJSON(data []byte) error

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"`
}

Response holds the response body struct for the package flushjob

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31

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