Documentation
¶
Overview ¶
Forces any buffered data to be processed by the job.
Index ¶
- Variables
- type FlushJob
- func (r *FlushJob) AdvanceTime(value string) *FlushJob
- func (r *FlushJob) CalcInterim(b bool) *FlushJob
- func (r FlushJob) Do(ctx context.Context) (*http.Response, error)
- func (r *FlushJob) End(value string) *FlushJob
- func (r *FlushJob) Header(key, value string) *FlushJob
- func (r *FlushJob) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *FlushJob) JobId(v string) *FlushJob
- func (r *FlushJob) Raw(raw json.RawMessage) *FlushJob
- func (r *FlushJob) Request(req *Request) *FlushJob
- func (r *FlushJob) SkipTime(value string) *FlushJob
- func (r *FlushJob) Start(value string) *FlushJob
- type NewFlushJob
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) AdvanceTime(advancetime *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) CalcInterim(calcinterim bool) *RequestBuilder
- func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) SkipTime(skiptime *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder
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 FlushJob ¶
type FlushJob struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *FlushJob
Forces any buffered data to be processed by the job.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
func (*FlushJob) AdvanceTime ¶
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 ¶
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) End ¶
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) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
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.
type NewFlushJob ¶
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
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the flushjob.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) AdvanceTime ¶
func (rb *RequestBuilder) AdvanceTime(advancetime *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) CalcInterim ¶
func (rb *RequestBuilder) CalcInterim(calcinterim bool) *RequestBuilder
func (*RequestBuilder) End ¶
func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) SkipTime ¶
func (rb *RequestBuilder) SkipTime(skiptime *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) Start ¶
func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder