Documentation ¶
Index ¶
- func AddFlags(flags *flag.FlagSet)
- type Agent
- type Builder
- func (b *Builder) CreateAgent(logger *zap.Logger) (*Agent, error)
- func (b *Builder) GetProcessors(rep reporter.Reporter, mFactory metrics.Factory) ([]processors.Processor, error)
- func (b *Builder) InitFromViper(v *viper.Viper)
- func (b *Builder) WithMetricsFactory(mf metrics.Factory) *Builder
- func (b *Builder) WithReporter(r reporter.Reporter) *Builder
- type HTTPServerConfiguration
- type ProcessorConfiguration
- type ServerConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a composition of all services / components
func NewAgent ¶
func NewAgent( processors []processors.Processor, httpServer *http.Server, logger *zap.Logger, ) *Agent
NewAgent creates the new Agent.
type Builder ¶
type Builder struct { Processors []ProcessorConfiguration `yaml:"processors"` HTTPServer HTTPServerConfiguration `yaml:"httpServer"` Metrics jmetrics.Builder `yaml:"metrics"` // These 3 fields are copied from tchreporter.Builder because yaml does not parse embedded structs CollectorHostPorts []string `yaml:"collectorHostPorts"` DiscoveryMinPeers int `yaml:"minPeers"` CollectorServiceName string `yaml:"collectorServiceName"` tchreporter.Builder // contains filtered or unexported fields }
Builder Struct to hold configurations
func (*Builder) CreateAgent ¶
CreateAgent creates the Agent
func (*Builder) GetProcessors ¶
func (b *Builder) GetProcessors(rep reporter.Reporter, mFactory metrics.Factory) ([]processors.Processor, error)
GetProcessors creates Processors with attached Reporter
func (*Builder) InitFromViper ¶ added in v0.6.0
InitFromViper initializes Builder with properties retrieved from Viper.
func (*Builder) WithMetricsFactory ¶ added in v0.5.2
WithMetricsFactory sets an externally initialized metrics factory.
type HTTPServerConfiguration ¶
type HTTPServerConfiguration struct {
HostPort string `yaml:"hostPort" validate:"nonzero"`
}
HTTPServerConfiguration holds config for a server providing sampling strategies and baggage restrictions to clients
func (HTTPServerConfiguration) GetHTTPServer ¶
func (c HTTPServerConfiguration) GetHTTPServer(svc string, channel *tchannel.Channel, mFactory metrics.Factory) *http.Server
GetHTTPServer creates an HTTP server that provides sampling strategies and baggage restrictions to client libraries.
type ProcessorConfiguration ¶
type ProcessorConfiguration struct { Workers int `yaml:"workers"` Model model `yaml:"model"` Protocol protocol `yaml:"protocol"` Server ServerConfiguration `yaml:"server"` }
ProcessorConfiguration holds config for a processor that receives spans from Server
func (*ProcessorConfiguration) GetThriftProcessor ¶
func (c *ProcessorConfiguration) GetThriftProcessor( mFactory metrics.Factory, factory thrift.TProtocolFactory, handler processors.AgentProcessor, ) (processors.Processor, error)
GetThriftProcessor gets a TBufferedServer backed Processor using the collector configuration
type ServerConfiguration ¶
type ServerConfiguration struct { QueueSize int `yaml:"queueSize"` MaxPacketSize int `yaml:"maxPacketSize"` HostPort string `yaml:"hostPort" validate:"nonzero"` }
ServerConfiguration holds config for a server that receives spans from the network