Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorTrace ¶
type ErrorTrace struct {
Error error
}
func (ErrorTrace) TraceInterface ¶
func (t ErrorTrace) TraceInterface()
type ISenderHandle ¶
type ISenderHandle interface {
// Done indicates that the sender has terminated
Done()
}
ISenderHandle is an interface for registered senders
type ITrace ¶
type ITrace interface {
TraceInterface()
}
ITrace is an interface for actual data traces
type ITracer ¶
type ITracer interface { // Subscribe creates a new unbuffered channel and subscribes it to // traces from the Tracer // // Note that this channel should be continuously read from until unsubscribed // from, otherwise, the Tracer will block. Subscribe() chan ITrace // SubscribeChannel subscribe a channel to traces from the Tracer // // Note that this channel should be continuously read from (modulo buffering), // otherwise, the Tracer will block. SubscribeChannel(channel chan ITrace) chan ITrace // Unsubscribe removes channel from subscription list Unsubscribe(channel chan ITrace) // Trace sends in a trace to a tracer Trace(trace ITrace) // RegisterSender register a sender for terminate purposes // // Once Sender is being terminated, before closing subscription channels, // it'll wait until all senders call SenderHandle.Done RegisterSender() ISenderHandle // Done returns a channel that is closed when the tracer is done and terminated Done() chan struct{} }
type IWrappedTrace ¶
IWrappedTrace is a trace that wraps another trace.
The purpose of it is to allow components to produce traces that will be wrapped into additional context, without being aware of it.
Typically, this would be done by creating a NewTraceTransformingTracer tracer over the original one and passing it to such components.
Consumers looking for individual traces should use Unwrap to retrieve the original trace (as opposed to the wrapped one)
type Transformer ¶
type WarningTrace ¶
type WarningTrace struct {
Warning any
}
func (WarningTrace) TraceInterface ¶
func (t WarningTrace) TraceInterface()
Click to show internal directories.
Click to hide internal directories.