Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel represents a connection to a tracelet
func (*Channel) ReadStream ¶
func (t *Channel) ReadStream(subscriptions *map[string]chan *tracelet.TraceletToServer)
ReadStream reads messages from the tracelet channel and sends them to the provided channel
type UDPServer ¶
type UDPServer struct {
// contains filtered or unexported fields
}
UDPServer represents a tracelet server
func NewTraceletUDPServer ¶
NewTraceletUDPServer creates a new tracelet server
func (*UDPServer) ListenForConnections ¶
func (s *UDPServer) ListenForConnections()
ListenForConnections listens for connections to the tracelet server and starts reading stream
func (*UDPServer) Subscribe ¶
func (s *UDPServer) Subscribe(traceletPattern string) chan *tracelet.TraceletToServer
Subscribe subscribes to a tracelet pattern and returns a stream channel. All messages of tracelets whose ids matches the pattern will be sent to this channel. For the pattern regular expressions are used. For example ".*" will match all tracelets. The pattern is provided with fixed bounderies internally, so it is not necessary to use "^" and "$" to achieve an exact match.
func (*UDPServer) Unsubscribe ¶
Unsubscribe unsubscribes from a tracelet pattern