Documentation ¶
Index ¶
- type MockAgent
- func (s *MockAgent) AddSamplingStrategy(service string, strategy interface{})
- func (s *MockAgent) Close()
- func (s *MockAgent) EmitBatch(ctx context.Context, batch *jaeger.Batch) (err error)
- func (s *MockAgent) EmitZipkinBatch(context.Context, []*zipkincore.Span) (err error)
- func (s *MockAgent) GetJaegerBatches() []*jaeger.Batch
- func (s *MockAgent) GetZipkinSpans() []*zipkincore.Span
- func (s *MockAgent) IsServing() bool
- func (s *MockAgent) ResetJaegerBatches()
- func (s *MockAgent) ResetZipkinSpans()
- func (s *MockAgent) SamplingServerAddr() string
- func (s *MockAgent) SpanServerAddr() string
- func (s *MockAgent) SpanServerClient() (agent.Agent, error)
- type TUDPTransport
- func (p *TUDPTransport) Addr() net.Addr
- func (p *TUDPTransport) Close() error
- func (p *TUDPTransport) Conn() *net.UDPConn
- func (p *TUDPTransport) Flush() error
- func (p *TUDPTransport) IsOpen() bool
- func (p *TUDPTransport) Open() error
- func (p *TUDPTransport) Read(buf []byte) (int, error)
- func (p *TUDPTransport) RemainingBytes() uint64
- func (p *TUDPTransport) Write(buf []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAgent ¶
type MockAgent struct {
// contains filtered or unexported fields
}
MockAgent is a mock representation of Jaeger Agent. It receives spans over UDP, and has an HTTP endpoint for sampling strategies.
func StartMockAgent ¶
StartMockAgent runs a mock representation of jaeger-agent. This function returns a started server.
func (*MockAgent) AddSamplingStrategy ¶
AddSamplingStrategy registers a sampling strategy for a service
func (*MockAgent) EmitZipkinBatch ¶
EmitZipkinBatch is deprecated, use EmitBatch
func (*MockAgent) GetJaegerBatches ¶
GetJaegerBatches returns accumulated Jaeger batches
func (*MockAgent) GetZipkinSpans ¶
func (s *MockAgent) GetZipkinSpans() []*zipkincore.Span
GetZipkinSpans is deprecated use GetJaegerBatches
func (*MockAgent) ResetJaegerBatches ¶
func (s *MockAgent) ResetJaegerBatches()
ResetJaegerBatches discards accumulated Jaeger batches
func (*MockAgent) ResetZipkinSpans ¶
func (s *MockAgent) ResetZipkinSpans()
ResetZipkinSpans is deprecated use ResetJaegerBatches
func (*MockAgent) SamplingServerAddr ¶
SamplingServerAddr returns the host:port of HTTP server exposing sampling strategy endpoint
func (*MockAgent) SpanServerAddr ¶
SpanServerAddr returns the UDP host:port where MockAgent listens for spans
type TUDPTransport ¶
type TUDPTransport struct {
// contains filtered or unexported fields
}
TUDPTransport does UDP as a thrift.TTransport (read-only, write functions not implemented).
func NewTUDPServerTransport ¶
func NewTUDPServerTransport(hostPort string) (*TUDPTransport, error)
NewTUDPServerTransport creates a net.UDPConn-backed TTransport for Thrift servers It will listen for incoming udp packets on the specified host/port Example:
trans, err := utils.NewTUDPClientTransport("localhost:9001")
func (*TUDPTransport) Addr ¶
func (p *TUDPTransport) Addr() net.Addr
Addr returns the address that the transport is listening on or writing to
func (*TUDPTransport) Conn ¶
func (p *TUDPTransport) Conn() *net.UDPConn
Conn retrieves the underlying net.UDPConn
func (*TUDPTransport) Flush ¶
func (p *TUDPTransport) Flush() error
Flush flushes the write buffer as one udp packet
func (*TUDPTransport) IsOpen ¶
func (p *TUDPTransport) IsOpen() bool
IsOpen returns true if the connection is open
func (*TUDPTransport) Open ¶
func (p *TUDPTransport) Open() error
Open does nothing as connection is opened on creation Required to maintain thrift.TTransport interface
func (*TUDPTransport) Read ¶
func (p *TUDPTransport) Read(buf []byte) (int, error)
Read reads one UDP packet and puts it in the specified buf
func (*TUDPTransport) RemainingBytes ¶
func (p *TUDPTransport) RemainingBytes() uint64
RemainingBytes returns the max number of bytes (same as Thrift's StreamTransport) as we do not know how many bytes we have left.