Documentation ¶
Overview ¶
Updates the data stream lifecycle of the selected data streams.
Index ¶
- Variables
- type NewPutDataLifecycle
- type PutDataLifecycle
- func (r *PutDataLifecycle) DataRetention(duration types.Duration) *PutDataLifecycle
- func (r PutDataLifecycle) Do(ctx context.Context) (*Response, error)
- func (r *PutDataLifecycle) Downsampling(downsampling *types.DataStreamLifecycleDownsampling) *PutDataLifecycle
- func (r *PutDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataLifecycle
- func (r *PutDataLifecycle) Header(key, value string) *PutDataLifecycle
- func (r *PutDataLifecycle) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutDataLifecycle) MasterTimeout(duration string) *PutDataLifecycle
- func (r PutDataLifecycle) Perform(ctx context.Context) (*http.Response, error)
- func (r *PutDataLifecycle) Raw(raw io.Reader) *PutDataLifecycle
- func (r *PutDataLifecycle) Request(req *Request) *PutDataLifecycle
- func (r *PutDataLifecycle) Timeout(duration string) *PutDataLifecycle
- type Request
- type Response
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 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 New ¶
func New(tp elastictransport.Interface) *PutDataLifecycle
Updates the data stream lifecycle of the selected data streams.
https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html
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(ctx 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
func (r *PutDataLifecycle) Downsampling(downsampling *types.DataStreamLifecycleDownsampling) *PutDataLifecycle
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 ¶
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 ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutDataLifecycle) Raw ¶
func (r *PutDataLifecycle) Raw(raw io.Reader) *PutDataLifecycle
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