mirror of
https://github.com/minio/minio.git
synced 2025-04-26 13:02:24 -04:00
Fix shadowing issue in elasticsearch target (#6774)
This commit is contained in:
parent
71c66464c1
commit
d58fc68137
@ -70,7 +70,7 @@ func (target *ElasticsearchTarget) ID() event.TargetID {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send - sends event to Elasticsearch.
|
// Send - sends event to Elasticsearch.
|
||||||
func (target *ElasticsearchTarget) Send(eventData event.Event) (err error) {
|
func (target *ElasticsearchTarget) Send(eventData event.Event) error {
|
||||||
var key string
|
var key string
|
||||||
|
|
||||||
remove := func() error {
|
remove := func() error {
|
||||||
@ -84,7 +84,7 @@ func (target *ElasticsearchTarget) Send(eventData event.Event) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add := func() error {
|
add := func() error {
|
||||||
_, err = target.client.Index().Index(target.args.Index).Type("event").BodyJson(map[string]interface{}{"Records": []event.Event{eventData}}).Do(context.Background())
|
_, err := target.client.Index().Index(target.args.Index).Type("event").BodyJson(map[string]interface{}{"Records": []event.Event{eventData}}).Do(context.Background())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user