config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 10 Imported by: 0 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 added in v0.6.0

type ClientBuilder interface {
	NewClient(logger *zap.Logger, metricsFactory metrics.Factory) (es.Client, error)
	GetNumShards() int64
	GetNumReplicas() int64
	GetMaxSpanAge() time.Duration
}

ClientBuilder creates new es.Client

type Configuration

type Configuration struct {
	Servers           []string
	Username          string
	Password          string
	Sniffer           bool          // https://github.com/olivere/elastic/wiki/Sniffing
	MaxSpanAge        time.Duration `yaml:"max_span_age"` // configures the maximum lookback on span reads
	NumShards         int64         `yaml:"shards"`
	NumReplicas       int64         `yaml:"replicas"`
	BulkSize          int
	BulkWorkers       int
	BulkActions       int
	BulkFlushInterval time.Duration
}

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

func (*Configuration) ApplyDefaults added in v0.6.0

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

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

func (*Configuration) GetConfigs

func (c *Configuration) GetConfigs() []elastic.ClientOptionFunc

GetConfigs wraps the configs to feed to the ElasticSearch client init

func (*Configuration) GetMaxSpanAge added in v0.6.0

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

GetMaxSpanAge returns max span age from Configuration

func (*Configuration) GetNumReplicas added in v0.6.0

func (c *Configuration) GetNumReplicas() int64

GetNumReplicas returns number of replicas from Configuration

func (*Configuration) GetNumShards added in v0.6.0

func (c *Configuration) GetNumShards() int64

GetNumShards returns number of shards from Configuration

func (*Configuration) NewClient

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

NewClient creates a new ElasticSearch client

Jump to

Keyboard shortcuts

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