Documentation ¶
Overview ¶
Forces any buffered data to be processed by the job.
Index ¶
- Variables
- type FlushJob
- func (r *FlushJob) AdvanceTime(v string) *FlushJob
- func (r *FlushJob) CalcInterim(b bool) *FlushJob
- func (r FlushJob) Do(ctx context.Context) (*Response, error)
- func (r *FlushJob) End(v 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) Perform(ctx context.Context) (*http.Response, error)
- func (r *FlushJob) Raw(raw io.Reader) *FlushJob
- func (r *FlushJob) Request(req *Request) *FlushJob
- func (r *FlushJob) SkipTime(v string) *FlushJob
- func (r *FlushJob) Start(v string) *FlushJob
- type NewFlushJob
- 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 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) Do ¶
Do runs the request through the transport, handle the response and returns a flushjob.Response
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) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*FlushJob) Raw ¶
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