Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Oct 2, 2018
1 parent e036d4e commit 66b2d78
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/agent/app/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ type Builder struct {
HTTPServer HTTPServerConfiguration `yaml:"httpServer"`
Metrics jmetrics.Builder `yaml:"metrics"`

reporterBuilders []reporter.Reporter
metricsFactory metrics.Factory
clientConfigManager httpserver.ClientConfigManager
reporters []reporter.Reporter
metricsFactory metrics.Factory
configManager httpserver.ClientConfigManager
}

// ProcessorConfiguration holds config for a processor that receives spans from Server
Expand All @@ -95,7 +95,7 @@ type HTTPServerConfiguration struct {

// WithReporters adds auxiliary reporters.
func (b *Builder) WithReporters(r ...reporter.Reporter) *Builder {
b.reporterBuilders = append(b.reporterBuilders, r...)
b.reporters = append(b.reporters, r...)
return b
}

Expand Down Expand Up @@ -136,15 +136,15 @@ func (b *Builder) CreateAgent(logger *zap.Logger) (*Agent, error) {
if err != nil {
return nil, err
}
server, err := b.HTTPServer.getHTTPServer(b.clientConfigManager, mFactory, &b.Metrics)
server, err := b.HTTPServer.getHTTPServer(b.configManager, mFactory, &b.Metrics)
if err != nil {
return nil, err
}
return NewAgent(processors, server, logger), nil
}

func (b *Builder) getReporter(logger *zap.Logger) reporter.Reporter {
return reporter.NewMultiReporter(b.reporterBuilders...)
return reporter.NewMultiReporter(b.reporters...)
}

// GetProcessors creates Processors with attached Reporter
Expand Down Expand Up @@ -179,7 +179,7 @@ func (b *Builder) GetProcessors(rep reporter.Reporter, mFactory metrics.Factory,

// WithClientConfigManager adds configuration manager.
func (b *Builder) WithClientConfigManager(manager httpserver.ClientConfigManager) *Builder {
b.clientConfigManager = manager
b.configManager = manager
return b
}

Expand Down

0 comments on commit 66b2d78

Please sign in to comment.