From da569818143338374f93cb4fb83ccede41717d82 Mon Sep 17 00:00:00 2001 From: Vijay Samuel Date: Wed, 31 May 2017 22:41:38 -0700 Subject: [PATCH] Making IP port indexer constructor public --- CHANGELOG.asciidoc | 1 + metricbeat/processor/kubernetes/indexing.go | 4 ++-- metricbeat/processor/kubernetes/indexing_test.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 1d2f6ab94d87..1b2e3be65428 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -207,6 +207,7 @@ https://github.com/elastic/beats/compare/v5.4.0...v6.0.0-alpha1[View commits] - Add experimental Elasticsearch module. {pull}3903[3903] - Add experimental Kibana module. {pull}3895[3895] - Move elasticsearch metricset node_stats under node.stats namespace. {pull}4142[4142] +- Make IP port indexer constructor public {pull}4434[4434] *Packetbeat* diff --git a/metricbeat/processor/kubernetes/indexing.go b/metricbeat/processor/kubernetes/indexing.go index e20d62c89849..462bdffce687 100644 --- a/metricbeat/processor/kubernetes/indexing.go +++ b/metricbeat/processor/kubernetes/indexing.go @@ -14,7 +14,7 @@ const ( func init() { // Register default indexers - kubernetes.Indexing.AddIndexer(IpPortIndexerName, newIpPortIndexer) + kubernetes.Indexing.AddIndexer(IpPortIndexerName, NewIpPortIndexer) cfg := common.NewConfig() //Add IP Port Indexer as a default indexer @@ -35,7 +35,7 @@ type IpPortIndexer struct { genMeta kubernetes.GenMeta } -func newIpPortIndexer(_ common.Config, genMeta kubernetes.GenMeta) (kubernetes.Indexer, error) { +func NewIpPortIndexer(_ common.Config, genMeta kubernetes.GenMeta) (kubernetes.Indexer, error) { return &IpPortIndexer{genMeta: genMeta}, nil } diff --git a/metricbeat/processor/kubernetes/indexing_test.go b/metricbeat/processor/kubernetes/indexing_test.go index 294a8d24d6a4..4dcd740c483c 100644 --- a/metricbeat/processor/kubernetes/indexing_test.go +++ b/metricbeat/processor/kubernetes/indexing_test.go @@ -14,7 +14,7 @@ var metagen = &kubernetes.GenDefaultMeta{} func TestIpPortIndexer(t *testing.T) { var testConfig = common.NewConfig() - ipIndexer, err := newIpPortIndexer(*testConfig, metagen) + ipIndexer, err := NewIpPortIndexer(*testConfig, metagen) assert.Nil(t, err) podName := "testpod"