tchannel

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags added in v1.8.0

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Builder.

Types

type Builder

type Builder struct {
	// 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"`

	// ConnCheckTimeout is the timeout used when establishing new connections.
	ConnCheckTimeout time.Duration
	// contains filtered or unexported fields
}

Builder Struct to hold configurations

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a new reporter builder.

func (*Builder) CreateReporter

func (b *Builder) CreateReporter(mFactory metrics.Factory, logger *zap.Logger) (*Reporter, error)

CreateReporter creates the TChannel-based Reporter

func (*Builder) InitFromViper added in v1.8.0

func (b *Builder) InitFromViper(v *viper.Viper, logger *zap.Logger) *Builder

InitFromViper initializes Builder with properties retrieved from Viper.

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

type ProxyBuilder added in v1.8.0

type ProxyBuilder struct {
	// contains filtered or unexported fields
}

ProxyBuilder holds objects communicating with collector

func NewCollectorProxy added in v1.8.0

func NewCollectorProxy(builder *Builder, mFactory metrics.Factory, logger *zap.Logger) (*ProxyBuilder, error)

NewCollectorProxy creates ProxyBuilder

func (ProxyBuilder) GetManager added in v1.8.0

GetManager returns manager

func (ProxyBuilder) GetReporter added in v1.8.0

func (b ProxyBuilder) GetReporter() reporter.Reporter

GetReporter returns Reporter

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter forwards received spans to central collector tier over TChannel.

func New

func New(
	collectorServiceName string,
	channel *tchannel.Channel,
	peerListMgr *peerlistmgr.PeerListManager,
	mFactory metrics.Factory,
	zlogger *zap.Logger,
) *Reporter

New creates new TChannel-based Reporter.

func (*Reporter) Channel

func (r *Reporter) Channel() *tchannel.Channel

Channel returns the TChannel used by the reporter.

func (*Reporter) CollectorServiceName added in v1.8.0

func (r *Reporter) CollectorServiceName() string

CollectorServiceName returns collector service name.

func (*Reporter) EmitBatch

func (r *Reporter) EmitBatch(batch *jaeger.Batch) error

EmitBatch implements EmitBatch() of Reporter

func (*Reporter) EmitZipkinBatch

func (r *Reporter) EmitZipkinBatch(spans []*zipkincore.Span) error

EmitZipkinBatch implements EmitZipkinBatch() of Reporter

Jump to

Keyboard shortcuts

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