tracelet

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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) Close

func (t *Channel) Close()

Close closes the tracelet channel

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

func NewTraceletUDPServer(port int, timeout time.Duration) *UDPServer

NewTraceletUDPServer creates a new tracelet server

func (*UDPServer) Close

func (s *UDPServer) Close()

Close closes the 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

func (s *UDPServer) Unsubscribe(traceletPattern string)

Unsubscribe unsubscribes from a tracelet pattern

Jump to

Keyboard shortcuts

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