Documentation ¶
Overview ¶
Updates an alias to point to a new index when the existing index is considered to be too large or too old.
Index ¶
- Variables
- type NewRollover
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Aliases(values map[types.IndexName]*types.AliasBuilder) *RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) Conditions(conditions *types.RolloverConditionsBuilder) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) Mappings(mappings *types.TypeMappingBuilder) *RequestBuilder
- func (rb *RequestBuilder) Settings(value map[string]interface{}) *RequestBuilder
- type Rollover
- func (r *Rollover) Alias(v string) *Rollover
- func (r Rollover) Do(ctx context.Context) (*http.Response, error)
- func (r *Rollover) DryRun(b bool) *Rollover
- func (r *Rollover) Header(key, value string) *Rollover
- func (r *Rollover) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Rollover) MasterTimeout(value string) *Rollover
- func (r *Rollover) NewIndex(v string) *Rollover
- func (r *Rollover) Raw(raw json.RawMessage) *Rollover
- func (r *Rollover) Request(req *Request) *Rollover
- func (r *Rollover) Timeout(value string) *Rollover
- func (r *Rollover) WaitForActiveShards(value string) *Rollover
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 NewRollover ¶
NewRollover type alias for index.
func NewRolloverFunc ¶
func NewRolloverFunc(tp elastictransport.Interface) NewRollover
NewRolloverFunc returns a new instance of Rollover 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 { Aliases map[types.IndexName]types.Alias `json:"aliases,omitempty"` Conditions *types.RolloverConditions `json:"conditions,omitempty"` Mappings *types.TypeMapping `json:"mappings,omitempty"` Settings map[string]interface{} `json:"settings,omitempty"` }
Request holds the request body struct for the package rollover
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the rollover.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) Aliases ¶
func (rb *RequestBuilder) Aliases(values map[types.IndexName]*types.AliasBuilder) *RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) Conditions ¶
func (rb *RequestBuilder) Conditions(conditions *types.RolloverConditionsBuilder) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Mappings ¶
func (rb *RequestBuilder) Mappings(mappings *types.TypeMappingBuilder) *RequestBuilder
func (*RequestBuilder) Settings ¶
func (rb *RequestBuilder) Settings(value map[string]interface{}) *RequestBuilder
type Rollover ¶
type Rollover struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Rollover
Updates an alias to point to a new index when the existing index is considered to be too large or too old.
https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
func (*Rollover) DryRun ¶
DryRun If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false API name: dry_run
func (*Rollover) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Rollover) MasterTimeout ¶
MasterTimeout Specify timeout for connection to master API name: master_timeout
func (*Rollover) Raw ¶
func (r *Rollover) Raw(raw json.RawMessage) *Rollover
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Rollover) WaitForActiveShards ¶
WaitForActiveShards Set the number of active shards to wait for on the newly created rollover index before the operation returns. API name: wait_for_active_shards