Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "elasticv5"
ModuleName is the name used in config file
Variables ¶
View Source
var (
ErrorCreateClientFailed1 = errutil.NewFactory("create elastic client failed: %q")
)
errors
Functions ¶
Types ¶
type OutputConfig ¶
type OutputConfig struct { config.OutputConfig URL []string `json:"url"` // elastic API entrypoints Index string `json:"index"` // index name to log DocumentType string `json:"document_type"` // type name to log DocumentID string `json:"document_id"` // id to log, used if you want to control id format RetryOnConflict int `json:"retry_on_conflict"` // the number of times Elasticsearch should internally retry an update/upserted document Username string `json:"username"` // basic auth username to Elasticsearch Password string `json:"password"` // basic auth password to Elasticsearch SimpleClient bool `json:"simple_client"` // if set uses simpleclient instead of newclient, disables some functionality Sniff bool `json:"sniff"` // find all nodes of your cluster, https://github.com/olivere/elastic/wiki/Sniffing // BulkActions specifies when to flush based on the number of actions // currently added. Defaults to 1000 and can be set to -1 to be disabled. BulkActions int `json:"bulk_actions,omitempty"` // BulkSize specifies when to flush based on the size (in bytes) of the actions // currently added. Defaults to 5 MB and can be set to -1 to be disabled. BulkSize int `json:"bulk_size,omitempty"` // BulkFlushInterval specifies when to flush at the end of the given interval. // Defaults to 30 seconds. If you want the bulk processor to // operate completely asynchronously, set both BulkActions and BulkSize to // -1 and set the FlushInterval to a meaningful interval. BulkFlushInterval time.Duration `json:"bulk_flush_interval"` // ExponentialBackoffInitialTimeout used to set the first/minimal interval in elastic.ExponentialBackoff // Defaults to 10s ExponentialBackoffInitialTimeout string `json:"exponential_backoff_initial_timeout,omitempty"` // ExponentialBackoffMaxTimeout used to set the maximum wait interval in elastic.ExponentialBackoff // Defaults to 5m ExponentialBackoffMaxTimeout string `json:"exponential_backoff_max_timeout,omitempty"` // SSLCertValidation Option to validate the server's certificate. Disabling this severely compromises security. // For more information on disabling certificate verification please read https://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf SSLCertValidation bool `json:"ssl_certificate_validation,omitempty"` // contains filtered or unexported fields }
OutputConfig holds the configuration json fields and internal objects
func DefaultOutputConfig ¶
func DefaultOutputConfig() OutputConfig
DefaultOutputConfig returns an OutputConfig struct with default values
func (*OutputConfig) BulkAfter ¶
func (t *OutputConfig) BulkAfter(executionID int64, requests []elastic.BulkableRequest, response *elastic.BulkResponse, err error)
BulkAfter execute after a commit to Elasticsearch
Click to show internal directories.
Click to hide internal directories.