Documentation ¶
Overview ¶
Get anomaly detection job results for influencers. Influencers are the entities that have contributed to, or are to blame for, the anomalies. Influencer results are available only if an `influencer_field_name` is specified in the job configuration.
Index ¶
- Variables
- type GetInfluencers
- func (r *GetInfluencers) Desc(desc bool) *GetInfluencers
- func (r GetInfluencers) Do(providedCtx context.Context) (*Response, error)
- func (r *GetInfluencers) End(datetime string) *GetInfluencers
- func (r *GetInfluencers) ErrorTrace(errortrace bool) *GetInfluencers
- func (r *GetInfluencers) ExcludeInterim(excludeinterim bool) *GetInfluencers
- func (r *GetInfluencers) FilterPath(filterpaths ...string) *GetInfluencers
- func (r *GetInfluencers) From(from int) *GetInfluencers
- func (r *GetInfluencers) Header(key, value string) *GetInfluencers
- func (r *GetInfluencers) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetInfluencers) Human(human bool) *GetInfluencers
- func (r *GetInfluencers) InfluencerScore(influencerscore string) *GetInfluencers
- func (r *GetInfluencers) Page(page *types.Page) *GetInfluencers
- func (r GetInfluencers) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetInfluencers) Pretty(pretty bool) *GetInfluencers
- func (r *GetInfluencers) Raw(raw io.Reader) *GetInfluencers
- func (r *GetInfluencers) Request(req *Request) *GetInfluencers
- func (r *GetInfluencers) Size(size int) *GetInfluencers
- func (r *GetInfluencers) Sort(field string) *GetInfluencers
- func (r *GetInfluencers) Start(datetime string) *GetInfluencers
- type NewGetInfluencers
- 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 GetInfluencers ¶
type GetInfluencers struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetInfluencers
Get anomaly detection job results for influencers. Influencers are the entities that have contributed to, or are to blame for, the anomalies. Influencer results are available only if an `influencer_field_name` is specified in the job configuration.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
func (*GetInfluencers) Desc ¶
func (r *GetInfluencers) Desc(desc bool) *GetInfluencers
Desc If true, the results are sorted in descending order. API name: desc
func (GetInfluencers) Do ¶
func (r GetInfluencers) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getinfluencers.Response
func (*GetInfluencers) End ¶
func (r *GetInfluencers) End(datetime string) *GetInfluencers
End Returns influencers with timestamps earlier than this time. The default value means it is unset and results are not limited to specific timestamps. API name: end
func (*GetInfluencers) ErrorTrace ¶ added in v8.14.0
func (r *GetInfluencers) ErrorTrace(errortrace bool) *GetInfluencers
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*GetInfluencers) ExcludeInterim ¶
func (r *GetInfluencers) ExcludeInterim(excludeinterim bool) *GetInfluencers
ExcludeInterim If true, the output excludes interim results. By default, interim results are included. API name: exclude_interim
func (*GetInfluencers) FilterPath ¶ added in v8.14.0
func (r *GetInfluencers) FilterPath(filterpaths ...string) *GetInfluencers
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*GetInfluencers) From ¶
func (r *GetInfluencers) From(from int) *GetInfluencers
From Skips the specified number of influencers. API name: from
func (*GetInfluencers) Header ¶
func (r *GetInfluencers) Header(key, value string) *GetInfluencers
Header set a key, value pair in the GetInfluencers headers map.
func (*GetInfluencers) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetInfluencers) Human ¶ added in v8.14.0
func (r *GetInfluencers) Human(human bool) *GetInfluencers
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*GetInfluencers) InfluencerScore ¶
func (r *GetInfluencers) InfluencerScore(influencerscore string) *GetInfluencers
InfluencerScore Returns influencers with anomaly scores greater than or equal to this value. API name: influencer_score
func (*GetInfluencers) Page ¶ added in v8.9.0
func (r *GetInfluencers) Page(page *types.Page) *GetInfluencers
Page Configures pagination. This parameter has the `from` and `size` properties. API name: page
func (GetInfluencers) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetInfluencers) Pretty ¶ added in v8.14.0
func (r *GetInfluencers) Pretty(pretty bool) *GetInfluencers
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*GetInfluencers) Raw ¶
func (r *GetInfluencers) Raw(raw io.Reader) *GetInfluencers
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*GetInfluencers) Request ¶
func (r *GetInfluencers) Request(req *Request) *GetInfluencers
Request allows to set the request property with the appropriate payload.
func (*GetInfluencers) Size ¶
func (r *GetInfluencers) Size(size int) *GetInfluencers
Size Specifies the maximum number of influencers to obtain. API name: size
func (*GetInfluencers) Sort ¶
func (r *GetInfluencers) Sort(field string) *GetInfluencers
Sort Specifies the sort field for the requested influencers. By default, the influencers are sorted by the `influencer_score` value. API name: sort
func (*GetInfluencers) Start ¶
func (r *GetInfluencers) Start(datetime string) *GetInfluencers
Start Returns influencers with timestamps after this time. The default value means it is unset and results are not limited to specific timestamps. API name: start
type NewGetInfluencers ¶
type NewGetInfluencers func(jobid string) *GetInfluencers
NewGetInfluencers type alias for index.
func NewGetInfluencersFunc ¶
func NewGetInfluencersFunc(tp elastictransport.Interface) NewGetInfluencers
NewGetInfluencersFunc returns a new instance of GetInfluencers 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 { // Page Configures pagination. // This parameter has the `from` and `size` properties. Page *types.Page `json:"page,omitempty"` }
Request holds the request body struct for the package getinfluencers
type Response ¶ added in v8.7.0
type Response struct { Count int64 `json:"count"` // Influencers Array of influencer objects Influencers []types.Influencer `json:"influencers"` }
Response holds the response body struct for the package getinfluencers