config

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ESConfigs         map[string]*ESConfig `mapstructure:"elastics"`
	Tasks             []*TaskCfg           `mapstructure:"tasks"`
	Level             string               `mapstructure:"level"`
	IgnoreSystemIndex bool                 `mapstructure:"ignore_system_index"`
	GatewayCfg        *GatewayCfg          `mapstructure:"gateway"`
}

type ESConfig

type ESConfig struct {
	Addresses []string `mapstructure:"addresses"`
	User      string   `mapstructure:"user"`
	Password  string   `mapstructure:"password"`
}

type GatewayCfg added in v1.1.0

type GatewayCfg struct {
	Address  string `mapstructure:"address"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`

	SourceES string `mapstructure:"source_es"`
	TargetES string `mapstructure:"target_es"`
	Master   string `mapstructure:"master"`
}

type IndexFilePair added in v1.0.30

type IndexFilePair struct {
	Index        string `mapstructure:"index"`
	IndexFileDir string `mapstructure:"index_file_dir"`
}

type IndexPair

type IndexPair struct {
	SourceIndex string `mapstructure:"source_index"`
	TargetIndex string `mapstructure:"target_index"`
}

type IndexTemplate added in v1.0.34

type IndexTemplate struct {
	Name     string   `mapstructure:"name"`
	Patterns []string `mapstructure:"pattern"`
	Order    int      `mapstructure:"order"`
}

type TaskAction

type TaskAction string
const (
	TaskActionCopyIndex TaskAction = "copy_index"
	TaskActionSync      TaskAction = "sync"
	TaskActionSyncDiff  TaskAction = "sync_diff"
	TaskActionCompare   TaskAction = "compare"
	TaskActionImport    TaskAction = "import"
	TaskActionExport    TaskAction = "export"
	TaskActionTemplate  TaskAction = "create_template"
)

type TaskCfg

type TaskCfg struct {
	Name              string           `mapstructure:"name"`
	IndexPattern      *string          `mapstructure:"index_pattern"`
	SourceES          string           `mapstructure:"source_es"`
	TargetES          string           `mapstructure:"target_es"`
	IndexPairs        []*IndexPair     `mapstructure:"index_pairs"`
	IndexTemplates    []*IndexTemplate `mapstructure:"index_templates"`
	TaskAction        TaskAction       `mapstructure:"action"`
	Force             bool             `mapstructure:"force"`
	ScrollSize        uint             `mapstructure:"scroll_size"`
	ScrollTime        uint             `mapstructure:"scroll_time"`
	Parallelism       uint             `mapstructure:"parallelism"`
	SliceSize         uint             `mapstructure:"slice_size"`
	BufferCount       uint             `mapstructure:"buffer_count"`
	ActionParallelism uint             `mapstructure:"action_parallelism"`
	ActionSize        uint             `mapstructure:"action_size"`
	Ids               []string         `mapstructure:"ids"`
	IndexFilePairs    []*IndexFilePair `mapstructure:"index_file_pairs"`
	IndexFileRoot     string           `mapstructure:"index_file_root"`
	Query             string           `mapstructure:"query"`
}

Jump to

Keyboard shortcuts

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