Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteAction ¶
func ExecuteAction(opts ActionExecuteOptions, createAction ActionCreatorFunction) error
ExecuteAction execute the action returned by the createAction function
Types ¶
type Action ¶
type Action interface {
Do() error
}
Action is an interface that each action (init, rollover and lookback) of the es-rollover should implement
type ActionCreatorFunction ¶
ActionCreatorFunction type is the function type in charge of create the action to be executed
type ActionExecuteOptions ¶
type ActionExecuteOptions struct { Args []string Viper *viper.Viper Logger *zap.Logger TLSFlags tlscfg.ClientFlagsConfig }
ActionExecuteOptions are the options passed to the execute action function
type Config ¶
type Config struct { IndexPrefix string Archive bool Username string Password string TLSEnabled bool ILMPolicyName string UseILM bool Timeout int SkipDependencies bool }
Config holds the global configurations for the es rollover, common to all actions
func (*Config) InitFromViper ¶
InitFromViper initializes config from viper.Viper.
type IndexOption ¶
type IndexOption struct { Mapping string // contains filtered or unexported fields }
IndexOption holds the information for the indices to rollover
func RolloverIndices ¶
func RolloverIndices(archive bool, skipDependencies bool, prefix string) []IndexOption
RolloverIndices return an array of indices to rollover
func (*IndexOption) IndexName ¶
func (i *IndexOption) IndexName() string
func (*IndexOption) InitialRolloverIndex ¶
func (i *IndexOption) InitialRolloverIndex() string
InitialRolloverIndex returns the initial index rollover name
func (*IndexOption) ReadAliasName ¶
func (i *IndexOption) ReadAliasName() string
ReadAliasName returns read alias name of the index
func (*IndexOption) TemplateName ¶
func (i *IndexOption) TemplateName() string
TemplateName returns the prefixed template name
func (*IndexOption) WriteAliasName ¶
func (i *IndexOption) WriteAliasName() string
WriteAliasName returns write alias name of the index