Documentation ¶
Overview ¶
Validates an anomaly detection detector.
Index ¶
- Variables
- type NewValidateDetector
- type ValidateDetector
- func (r ValidateDetector) Do(ctx context.Context) (*http.Response, error)
- func (r *ValidateDetector) Header(key, value string) *ValidateDetector
- func (r *ValidateDetector) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *ValidateDetector) Raw(raw json.RawMessage) *ValidateDetector
- func (r *ValidateDetector) Request(req *types.Detector) *ValidateDetector
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 NewValidateDetector ¶
type NewValidateDetector func() *ValidateDetector
NewValidateDetector type alias for index.
func NewValidateDetectorFunc ¶
func NewValidateDetectorFunc(tp elastictransport.Interface) NewValidateDetector
NewValidateDetectorFunc returns a new instance of ValidateDetector with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type ValidateDetector ¶
type ValidateDetector struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ValidateDetector
Validates an anomaly detection detector.
https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
func (*ValidateDetector) Header ¶
func (r *ValidateDetector) Header(key, value string) *ValidateDetector
Header set a key, value pair in the ValidateDetector headers map.
func (*ValidateDetector) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*ValidateDetector) Raw ¶
func (r *ValidateDetector) Raw(raw json.RawMessage) *ValidateDetector
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*ValidateDetector) Request ¶
func (r *ValidateDetector) Request(req *types.Detector) *ValidateDetector
Request allows to set the request property with the appropriate payload.