putdatalifecycle

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Updates the data stream lifecycle of the selected data streams.

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 NewPutDataLifecycle

type NewPutDataLifecycle func(name string) *PutDataLifecycle

NewPutDataLifecycle type alias for index.

func NewPutDataLifecycleFunc

func NewPutDataLifecycleFunc(tp elastictransport.Interface) NewPutDataLifecycle

NewPutDataLifecycleFunc returns a new instance of PutDataLifecycle with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type PutDataLifecycle

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

func (*PutDataLifecycle) DataRetention added in v8.9.0

func (r *PutDataLifecycle) DataRetention(duration types.Duration) *PutDataLifecycle

DataRetention If defined, every document added to this data stream will be stored at least for this time frame. Any time after this duration the document could be deleted. When empty, every document in this data stream will be stored indefinitely. API name: data_retention

func (PutDataLifecycle) Do

func (r PutDataLifecycle) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a putdatalifecycle.Response

func (*PutDataLifecycle) Downsampling added in v8.11.0

Downsampling If defined, every backing index will execute the configured downsampling configuration after the backing index is not the data stream write index anymore. API name: downsampling

func (*PutDataLifecycle) ExpandWildcards

func (r *PutDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataLifecycle

ExpandWildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `hidden`, `open`, `closed`, `none`. API name: expand_wildcards

func (*PutDataLifecycle) Header

func (r *PutDataLifecycle) Header(key, value string) *PutDataLifecycle

Header set a key, value pair in the PutDataLifecycle headers map.

func (*PutDataLifecycle) HttpRequest

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

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

func (*PutDataLifecycle) MasterTimeout

func (r *PutDataLifecycle) MasterTimeout(duration string) *PutDataLifecycle

MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout

func (PutDataLifecycle) Perform

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

Perform runs the http.Request through the provided transport and returns an http.Response.

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

func (r *PutDataLifecycle) Request(req *Request) *PutDataLifecycle

Request allows to set the request property with the appropriate payload.

func (*PutDataLifecycle) Timeout

func (r *PutDataLifecycle) Timeout(duration string) *PutDataLifecycle

Timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout

type Request

type Request struct {

	// DataRetention If defined, every document added to this data stream will be stored at least
	// for this time frame.
	// Any time after this duration the document could be deleted.
	// When empty, every document in this data stream will be stored indefinitely.
	DataRetention types.Duration `json:"data_retention,omitempty"`
	// Downsampling If defined, every backing index will execute the configured downsampling
	// configuration after the backing
	// index is not the data stream write index anymore.
	Downsampling *types.DataStreamLifecycleDownsampling `json:"downsampling,omitempty"`
}

Request holds the request body struct for the package putdatalifecycle

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L75

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

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

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

Response holds the response body struct for the package putdatalifecycle

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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