startdatafeed

package
v8.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 12 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/b7d4fb5356784b8bcde8d3a2d62a1fd5621ffd67/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L91

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON added in v8.12.1

func (s *Request) UnmarshalJSON(data []byte) error

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

https://github.com/elastic/elasticsearch-specification/blob/b7d4fb5356784b8bcde8d3a2d62a1fd5621ffd67/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

func (*Response) UnmarshalJSON added in v8.7.1

func (s *Response) UnmarshalJSON(data []byte) error

type StartDatafeed

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

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

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

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

func (StartDatafeed) Perform added in v8.7.0

func (r StartDatafeed) Perform(providedCtx context.Context) (*http.Response, error)

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

Jump to

Keyboard shortcuts

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