Documentation
¶
Overview ¶
Opens one or more anomaly detection jobs.
Index ¶
- Variables
- type NewOpenJob
- type OpenJob
- func (r OpenJob) Do(ctx context.Context) (*http.Response, error)
- func (r *OpenJob) Header(key, value string) *OpenJob
- func (r *OpenJob) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *OpenJob) JobId(v string) *OpenJob
- func (r *OpenJob) Raw(raw json.RawMessage) *OpenJob
- func (r *OpenJob) Request(req *Request) *OpenJob
- func (r *OpenJob) Timeout(value string) *OpenJob
- type Request
- type 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 NewOpenJob ¶
NewOpenJob type alias for index.
func NewOpenJobFunc ¶
func NewOpenJobFunc(tp elastictransport.Interface) NewOpenJob
NewOpenJobFunc returns a new instance of OpenJob with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type OpenJob ¶
type OpenJob struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *OpenJob
Opens one or more anomaly detection jobs.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
func (*OpenJob) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*OpenJob) Raw ¶
func (r *OpenJob) Raw(raw json.RawMessage) *OpenJob
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
type Request ¶
type Request struct { // Timeout Refer to the description for the `timeout` query parameter. Timeout *types.Duration `json:"timeout,omitempty"` }
Request holds the request body struct for the package openjob
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the openjob.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Timeout ¶
func (rb *RequestBuilder) Timeout(timeout *types.DurationBuilder) *RequestBuilder