Documentation ¶
Overview ¶
Starts one or more datafeeds.
Index ¶
- Variables
- type NewStartDatafeed
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) Timeout(timeout *types.DurationBuilder) *RequestBuilder
- type StartDatafeed
- func (r *StartDatafeed) DatafeedId(v string) *StartDatafeed
- func (r StartDatafeed) Do(ctx context.Context) (*http.Response, error)
- func (r *StartDatafeed) End(value string) *StartDatafeed
- func (r *StartDatafeed) Header(key, value string) *StartDatafeed
- func (r *StartDatafeed) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *StartDatafeed) Raw(raw json.RawMessage) *StartDatafeed
- func (r *StartDatafeed) Request(req *Request) *StartDatafeed
- func (r *StartDatafeed) Start(value string) *StartDatafeed
- func (r *StartDatafeed) Timeout(value string) *StartDatafeed
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 NewStartDatafeed ¶
type NewStartDatafeed func(datafeedid string) *StartDatafeed
NewStartDatafeed type alias for index.
func NewStartDatafeedFunc ¶
func NewStartDatafeedFunc(tp elastictransport.Interface) NewStartDatafeed
NewStartDatafeedFunc returns a new instance of StartDatafeed 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 { // End Refer to the description for the `end` query parameter. End *types.DateTime `json:"end,omitempty"` // Start Refer to the description for the `start` query parameter. Start *types.DateTime `json:"start,omitempty"` // 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 startdatafeed
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the startdatafeed.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) End ¶
func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Start ¶
func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) Timeout ¶
func (rb *RequestBuilder) Timeout(timeout *types.DurationBuilder) *RequestBuilder
type StartDatafeed ¶
type StartDatafeed struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *StartDatafeed
Starts one or more datafeeds.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
func (*StartDatafeed) DatafeedId ¶
func (r *StartDatafeed) DatafeedId(v string) *StartDatafeed
DatafeedId A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. API Name: datafeedid
func (*StartDatafeed) End ¶
func (r *StartDatafeed) End(value string) *StartDatafeed
End The time that the datafeed should end, which can be specified by using one of the following formats:
* ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z` * ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00` * Milliseconds since the epoch, for example `1485061200000`
Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where `Z` is accepted as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the `+` used in time zone designators must be encoded as `%2B`. The end time value is exclusive. If you do not specify an end time, the datafeed runs continuously. API name: end
func (*StartDatafeed) Header ¶
func (r *StartDatafeed) Header(key, value string) *StartDatafeed
Header set a key, value pair in the StartDatafeed headers map.
func (*StartDatafeed) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*StartDatafeed) Raw ¶
func (r *StartDatafeed) Raw(raw json.RawMessage) *StartDatafeed
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*StartDatafeed) Request ¶
func (r *StartDatafeed) Request(req *Request) *StartDatafeed
Request allows to set the request property with the appropriate payload.
func (*StartDatafeed) Start ¶
func (r *StartDatafeed) Start(value string) *StartDatafeed
Start The time that the datafeed should begin, which can be specified by using the same formats as the `end` parameter. This value is inclusive. If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis starts from the earliest time for which data is available. If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record. API name: start
func (*StartDatafeed) Timeout ¶
func (r *StartDatafeed) Timeout(value string) *StartDatafeed
Timeout Specifies the amount of time to wait until a datafeed starts. API name: timeout