Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadBuf ¶
type ReadBuf struct {
// contains filtered or unexported fields
}
ReadBuf为一次性读取,不会分批次读数据,这个为udp server上接收到的trace包内存数据
type Server ¶
type Server interface { Serve() IsServing() bool Stop() DataChan() chan *ReadBuf DataRecd(*ReadBuf) // must be called by consumer after reading data from the ReadBuf }
Server为agent processors的udp server,用于接收微服务发送过来的trace
type TBufferedServer ¶
type TBufferedServer struct {
// contains filtered or unexported fields
}
TBufferedServer用于读取微服务发送过来的trace包数据的相关存储参数
func NewTBufferedServer ¶
func NewTBufferedServer( transport thrift.TTransport, maxQueueSize int, maxPacketSize int, mFactory metrics.Factory, ) (*TBufferedServer, error)
NewTBufferedServer方法用于创建一个TBufferedServer实例, 通过这个实例进行udp server监听数据读取
func (*TBufferedServer) DataChan ¶
func (s *TBufferedServer) DataChan() chan *ReadBuf
DataChan方法用于每个processor worker的阻塞等待channel队列上trace包的到来
func (*TBufferedServer) DataRecd ¶
func (s *TBufferedServer) DataRecd(buf *ReadBuf)
DataRecd方法用于当process worker消费者处理完一个trace包后,就表示待处理的trace包数量-1 并把trace包释放到临时对象池
func (*TBufferedServer) IsServing ¶
func (s *TBufferedServer) IsServing() bool
IsServing方法用于校验udp server是否要退出
func (*TBufferedServer) Serve ¶
func (s *TBufferedServer) Serve()
Serve方法用于初始化ReadBuf,并开启udp server监听
func (*TBufferedServer) Stop ¶
func (s *TBufferedServer) Stop()
Stop 方法用于退出udp server监听, 并关闭channel队列
Click to show internal directories.
Click to hide internal directories.