startdatafeed

package
v8.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Starts one or more datafeeds.

Index

Constants

This section is empty.

Variables

View Source
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

https://github.com/elastic/elasticsearch-specification/blob/4316fc1aa18bb04678b156f23b22c9d3f996f9c9/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L91

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 (*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 (*RequestBuilder) Timeout

func (rb *RequestBuilder) Timeout(timeout *types.DurationBuilder) *RequestBuilder

type StartDatafeed

type StartDatafeed struct {
	// contains filtered or unexported fields
}

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) Do

Do runs the http.Request through the provided transport.

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

func (r *StartDatafeed) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*StartDatafeed) 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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL