Documentation ¶
Overview ¶
Sends data to an anomaly detection job for analysis.
Index ¶
- Variables
- type NewPostData
- type PostData
- func (r PostData) Do(providedCtx context.Context) (*Response, error)
- func (r *PostData) Header(key, value string) *PostData
- func (r *PostData) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r PostData) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PostData) Raw(raw io.Reader) *PostData
- func (r *PostData) Request(req *Request) *PostData
- func (r *PostData) ResetEnd(datetime string) *PostData
- func (r *PostData) ResetStart(datetime string) *PostData
- 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 NewPostData ¶
NewPostData type alias for index.
func NewPostDataFunc ¶
func NewPostDataFunc(tp elastictransport.Interface) NewPostData
NewPostDataFunc returns a new instance of PostData with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PostData ¶
type PostData struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PostData
Sends data to an anomaly detection job for analysis.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
func (PostData) Do ¶
Do runs the request through the transport, handle the response and returns a postdata.Response
func (*PostData) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (PostData) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PostData) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PostData) ResetEnd ¶
ResetEnd Specifies the end of the bucket resetting range. API name: reset_end
func (*PostData) ResetStart ¶
ResetStart Specifies the start of the bucket resetting range. API name: reset_start
type Request ¶ added in v8.11.0
type Request = []json.RawMessage
Request holds the request body struct for the package postdata
type Response ¶
type Response struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp int64 `json:"earliest_record_timestamp"` EmptyBucketCount int64 `json:"empty_bucket_count"` InputBytes int64 `json:"input_bytes"` InputFieldCount int64 `json:"input_field_count"` InputRecordCount int64 `json:"input_record_count"` InvalidDateCount int64 `json:"invalid_date_count"` JobId string `json:"job_id"` LastDataTime int `json:"last_data_time"` LatestRecordTimestamp int64 `json:"latest_record_timestamp"` MissingFieldCount int64 `json:"missing_field_count"` OutOfOrderTimestampCount int64 `json:"out_of_order_timestamp_count"` ProcessedFieldCount int64 `json:"processed_field_count"` ProcessedRecordCount int64 `json:"processed_record_count"` SparseBucketCount int64 `json:"sparse_bucket_count"` }
Response holds the response body struct for the package postdata