app

package
v1.46.0-tgt.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags

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

type ActionCreatorFunction func(client.Client, Config) Action

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

func (c *Config) InitFromViper(v *viper.Viper)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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