Documentation
¶
Index ¶
- type Config
- func (c *Config) Backoff() int
- func (c *Config) Endpoint() string
- func (c *Config) IndexName() string
- func (c *Config) Interval() time.Duration
- func (c *Config) Logger() logrus.FieldLogger
- func (c *Config) Name() string
- func (c *Config) NewInstance(ctx context.Context, payloadChan chan *recorder.RecordJob) (recorder.DataRecorder, error)
- func (c *Config) RoutePath() string
- func (c *Config) Timeout() time.Duration
- type Recorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Endpoint_ string `mapstructure:"endpoint"`
Timeout_ string `mapstructure:"timeout"`
Backoff_ int `mapstructure:"backoff"`
IndexName_ string `mapstructure:"index_name"`
// contains filtered or unexported fields
}
Config holds the necessary configuration for setting up an elasticsearch reader endpoint.
func FromViper ¶
FromViper constructs the necessary configuration for bootstrapping the elasticsearch reader
func (*Config) Logger ¶
func (c *Config) Logger() logrus.FieldLogger
func (*Config) NewInstance ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder contains an elasticsearch client and an indexname for recording data It implements DataRecorder interface
func NewRecorder ¶
func NewRecorder(ctx context.Context, log logrus.FieldLogger, payloadChan chan *recorder.RecordJob, name, endpoint, indexName string, interval, timeout time.Duration) (*Recorder, error)
NewRecorder returns an error if it can't create the index
func (*Recorder) PayloadChan ¶
PayloadChan returns the channel it receives the information from
Click to show internal directories.
Click to hide internal directories.