Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IP port indexer constructor public #4434

Merged
merged 1 commit into from
Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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