grpc

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 32 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Options.

Types

type ConnBuilder added in v1.12.0

type ConnBuilder struct {
	// CollectorHostPorts is list of host:port Jaeger Collectors.
	CollectorHostPorts []string `yaml:"collectorHostPorts"`

	MaxRetry uint
	TLS      tlscfg.Options

	DiscoveryMinPeers int
	Notifier          discovery.Notifier
	Discoverer        discovery.Discoverer

	AdditionalDialOptions []grpc.DialOption
}

ConnBuilder Struct to hold configurations

func NewConnBuilder added in v1.12.0

func NewConnBuilder() *ConnBuilder

NewConnBuilder creates a new grpc connection builder.

func (*ConnBuilder) CreateConnection added in v1.12.0

func (b *ConnBuilder) CreateConnection(ctx context.Context, logger *zap.Logger, mFactory metrics.Factory) (*grpc.ClientConn, error)

CreateConnection creates the gRPC connection

func (*ConnBuilder) InitFromViper added in v1.12.0

func (b *ConnBuilder) InitFromViper(v *viper.Viper) (*ConnBuilder, error)

InitFromViper initializes Options with properties retrieved from Viper.

type ProxyBuilder

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

ProxyBuilder holds objects communicating with collector

func NewCollectorProxy

func NewCollectorProxy(ctx context.Context, builder *ConnBuilder, agentTags map[string]string, mFactory metrics.Factory, logger *zap.Logger) (*ProxyBuilder, error)

NewCollectorProxy creates ProxyBuilder

func (ProxyBuilder) Close

func (b ProxyBuilder) Close() error

Close closes connections used by proxy.

func (ProxyBuilder) GetConn added in v1.13.0

func (b ProxyBuilder) GetConn() *grpc.ClientConn

GetConn returns grpc conn

func (ProxyBuilder) GetManager

GetManager returns manager

func (ProxyBuilder) GetReporter

func (b ProxyBuilder) GetReporter() reporter.Reporter

GetReporter returns Reporter

type Reporter

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

Reporter reports data to collector over gRPC.

func NewReporter

func NewReporter(conn *grpc.ClientConn, agentTags map[string]string, logger *zap.Logger) *Reporter

NewReporter creates gRPC reporter.

func (*Reporter) EmitBatch

func (r *Reporter) EmitBatch(ctx context.Context, b *thrift.Batch) error

EmitBatch implements EmitBatch() of Reporter

func (*Reporter) EmitZipkinBatch

func (r *Reporter) EmitZipkinBatch(ctx context.Context, zSpans []*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