Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicIndexFunc ¶ added in v1.6.3
type DynamicIndexFunc func() string
DynamicIndexFunc is the name of the index to be used, evaluated at the insertion time.
type ElasticSearch ¶
type ElasticSearch struct { // Client is the ElasticSearch client. Client *elasticsearch.Client // Config is the ElasticSearch configuration. Config Config // DynamicIndex is the name of the index to be used, evaluated at the // insertion time. // // NOTE: It's the caller's responsibility to create the index, define its // mapping, and settings. DynamicIndex DynamicIndexFunc }
ElasticSearch `Output` definition.
func New ¶
func New( indexName string, esConfig Config, ) *ElasticSearch
New is a built-in `output` - named `ElasticSearch`, that writes to ElasticSearch.
NOTE: By default, data is JSON-formatted. NOTE: `DocumentID` is automatically generated. NOTE: It's the caller's responsibility to create the index, define its mapping, and settings.
func NewWithDynamicIndex ¶ added in v1.6.3
func NewWithDynamicIndex( indexName DynamicIndexFunc, esConfig Config, ) *ElasticSearch
NewWithDynamicIndex is a built-in `output` - named `ElasticSearch`, that writes to ElasticSearch. It allows to define a function that returns the index name to be used, evaluated at the insertion time.
NOTE: By default, data is JSON-formatted. NOTE: `DocumentID` is automatically generated. NOTE: It's the caller's responsibility to create the index, define its mapping, and settings.