Skip to content

Commit

Permalink
Making IP port indexer constructor public
Browse files Browse the repository at this point in the history
  • Loading branch information
vjsamuel committed Jun 1, 2017
1 parent 08c2542 commit da56981
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/processor/kubernetes/indexing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/processor/kubernetes/indexing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit da56981

Please sign in to comment.