app

package
v0.0.0-...-437ec41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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,
	samplingServer *http.Server,
	discoveryClient interface{},
	logger *zap.Logger,
) *Agent

NewAgent creates the new Agent.

func (*Agent) Run

func (a *Agent) Run() error

Run runs all of agent UDP and HTTP servers in separate go-routines. It returns an error when it's immediately apparent on startup, but any errors happening after starting the servers are only logged.

func (*Agent) Stop

func (a *Agent) Stop()

Stop forces all agent go routines to exit.

type Builder

type Builder struct {
	Processors     []ProcessorConfiguration    `yaml:"processors"`
	SamplingServer SamplingServerConfiguration `yaml:"samplingServer"`

	// CollectorHostPorts are host:ports of a static list of Jaeger Collectors.
	CollectorHostPorts []string `yaml:"collectorHostPorts"`

	// MinPeers is the min number of servers we want the agent to connect to.
	// If zero, defaults to min(3, number of peers returned by service discovery)
	DiscoveryMinPeers int `yaml:"minPeers"`

	// CollectorServiceName is the name that Jaeger Collector's TChannel server
	// responds to.
	CollectorServiceName string `yaml:"collectorServiceName"`
	// contains filtered or unexported fields
}

Builder Struct to hold configurations

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a default builder with three processors.

func (*Builder) Bind

func (b *Builder) Bind(flags *flag.FlagSet)

Bind binds the agent builder to command line options

func (*Builder) CreateAgent

func (b *Builder) CreateAgent(mFactory metrics.Factory, logger *zap.Logger) (*Agent, error)

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) WithChannel

func (b *Builder) WithChannel(c *tchannel.Channel) *Builder

WithChannel sets tchannel channel

func (*Builder) WithCollectorServiceName

func (b *Builder) WithCollectorServiceName(s string) *Builder

WithCollectorServiceName sets collector service name

func (*Builder) WithDiscoverer

func (b *Builder) WithDiscoverer(d discovery.Discoverer) *Builder

WithDiscoverer sets service discovery

func (*Builder) WithDiscoveryNotifier

func (b *Builder) WithDiscoveryNotifier(n discovery.Notifier) *Builder

WithDiscoveryNotifier sets service discovery notifier

func (*Builder) WithReporter

func (b *Builder) WithReporter(r reporter.Reporter) *Builder

WithReporter adds auxilary reporters

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 SamplingServerConfiguration

type SamplingServerConfiguration struct {
	HostPort string `yaml:"hostPort" validate:"nonzero"`
}

SamplingServerConfiguration holds config for a server providing sampling strategies to clients

func (SamplingServerConfiguration) GetSamplingServer

func (c SamplingServerConfiguration) GetSamplingServer(svc string, channel *tchannel.Channel, mFactory metrics.Factory) *http.Server

GetSamplingServer creates an HTTP server that provides sampling strategies to client libraries.

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL