config

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientBuilder

type ClientBuilder interface {
	NewClient(logger *zap.Logger, metricsFactory metrics.Factory) (es.Client, error)
	GetNumShards() int64
	GetNumReplicas() int64
	GetMaxSpanAge() time.Duration
	GetMaxNumSpans() int
	GetIndexPrefix() string
	GetTagsFilePath() string
	GetAllTagsAsFields() bool
	GetTagDotReplacement() string
	GetUseReadWriteAliases() bool
	GetTokenFilePath() string
	IsEnabled() bool
	IsCreateIndexTemplates() bool
	GetVersion() uint
}

ClientBuilder creates new es.Client

type Configuration

type Configuration struct {
	Servers               []string
	Username              string
	Password              string
	TokenFilePath         string
	AllowTokenFromContext bool
	Sniffer               bool          // https://github.com/olivere/elastic/wiki/Sniffing
	MaxNumSpans           int           // defines maximum number of spans to fetch from storage per query
	MaxSpanAge            time.Duration `yaml:"max_span_age"` // configures the maximum lookback on span reads
	NumShards             int64         `yaml:"shards"`
	NumReplicas           int64         `yaml:"replicas"`
	Timeout               time.Duration `validate:"min=500"`
	BulkSize              int
	BulkWorkers           int
	BulkActions           int
	BulkFlushInterval     time.Duration
	IndexPrefix           string
	TagsFilePath          string
	AllTagsAsFields       bool
	TagDotReplacement     string
	Enabled               bool
	TLS                   TLSConfig
	UseReadWriteAliases   bool
	CreateIndexTemplates  bool
	Version               uint
}

Configuration describes the configuration properties needed to connect to an ElasticSearch cluster

func (*Configuration) ApplyDefaults

func (c *Configuration) ApplyDefaults(source *Configuration)

ApplyDefaults copies settings from source unless its own value is non-zero.

func (*Configuration) GetAllTagsAsFields

func (c *Configuration) GetAllTagsAsFields() bool

GetAllTagsAsFields returns true if all tags should be stored as object fields

func (*Configuration) GetIndexPrefix

func (c *Configuration) GetIndexPrefix() string

GetIndexPrefix returns index prefix

func (*Configuration) GetMaxNumSpans

func (c *Configuration) GetMaxNumSpans() int

GetMaxNumSpans returns max spans allowed per query from Configuration

func (*Configuration) GetMaxSpanAge

func (c *Configuration) GetMaxSpanAge() time.Duration

GetMaxSpanAge returns max span age from Configuration

func (*Configuration) GetNumReplicas

func (c *Configuration) GetNumReplicas() int64

GetNumReplicas returns number of replicas from Configuration

func (*Configuration) GetNumShards

func (c *Configuration) GetNumShards() int64

GetNumShards returns number of shards from Configuration

func (*Configuration) GetTagDotReplacement

func (c *Configuration) GetTagDotReplacement() string

GetTagDotReplacement returns character is used to replace dots in tag keys, when the tag is stored as object field.

func (*Configuration) GetTagsFilePath

func (c *Configuration) GetTagsFilePath() string

GetTagsFilePath returns a path to file containing tag keys

func (*Configuration) GetTokenFilePath

func (c *Configuration) GetTokenFilePath() string

GetTokenFilePath returns file path containing the bearer token

func (*Configuration) GetUseReadWriteAliases

func (c *Configuration) GetUseReadWriteAliases() bool

GetUseReadWriteAliases indicates whether read alias should be used

func (*Configuration) GetVersion

func (c *Configuration) GetVersion() uint

GetVersion returns Elasticsearch version

func (*Configuration) IsCreateIndexTemplates

func (c *Configuration) IsCreateIndexTemplates() bool

IsCreateIndexTemplates determines whether index templates should be created or not

func (*Configuration) IsEnabled

func (c *Configuration) IsEnabled() bool

IsEnabled determines whether storage is enabled

func (*Configuration) NewClient

func (c *Configuration) NewClient(logger *zap.Logger, metricsFactory metrics.Factory) (es.Client, error)

NewClient creates a new ElasticSearch client

type TLSConfig

type TLSConfig struct {
	Enabled        bool
	SkipHostVerify bool
	CertPath       string
	KeyPath        string
	CaPath         string
}

TLSConfig describes the configuration properties to connect tls enabled ElasticSearch cluster

Jump to

Keyboard shortcuts

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