Documentation ¶
Overview ¶
Starts one or more datafeeds.
Index ¶
- Variables
- type NewStartDatafeed
- type Request
- type Response
- type StartDatafeed
- func (r StartDatafeed) Do(providedCtx context.Context) (*Response, error)
- func (r *StartDatafeed) End(datetime types.DateTime) *StartDatafeed
- func (r *StartDatafeed) Header(key, value string) *StartDatafeed
- func (r *StartDatafeed) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r StartDatafeed) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *StartDatafeed) Raw(raw io.Reader) *StartDatafeed
- func (r *StartDatafeed) Request(req *Request) *StartDatafeed
- func (r *StartDatafeed) Start(datetime types.DateTime) *StartDatafeed
- func (r *StartDatafeed) Timeout(duration types.Duration) *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
func (*Request) FromJSON ¶ added in v8.5.0
FromJSON allows to load an arbitrary json into the request structure
func (*Request) UnmarshalJSON ¶ added in v8.12.1
type Response ¶ added in v8.7.0
type Response struct { // Node The ID of the node that the job was started on. In serverless this will be // the "serverless". // If the job is allowed to open lazily and has not yet been assigned to a node, // this value is an empty string. Node []string `json:"node"` // Started For a successful response, this value is always `true`. On failure, an // exception is returned instead. Started bool `json:"started"` }
Response holds the response body struct for the package startdatafeed
func (*Response) UnmarshalJSON ¶ added in v8.7.1
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) Do ¶
func (r StartDatafeed) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a startdatafeed.Response
func (*StartDatafeed) End ¶
func (r *StartDatafeed) End(datetime types.DateTime) *StartDatafeed
End Refer to the description for the `end` query parameter. 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) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*StartDatafeed) Raw ¶
func (r *StartDatafeed) Raw(raw io.Reader) *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(datetime types.DateTime) *StartDatafeed
Start Refer to the description for the `start` query parameter. API name: start
func (*StartDatafeed) Timeout ¶
func (r *StartDatafeed) Timeout(duration types.Duration) *StartDatafeed
Timeout Refer to the description for the `timeout` query parameter. API name: timeout