Documentation ¶
Index ¶
- Variables
- func AddTraceEventHandler(handler EventHandler)
- func NewPipeToggleMatchers(request *trace_pb.TogglePipeTracesRequest) (*PipeToggleMatchers, *ToggleResult)
- func RemoveTraceEventHandler(handler EventHandler)
- type ChannelPeekHandler
- func (self *ChannelPeekHandler) Close(channel.Channel)
- func (*ChannelPeekHandler) Connect(channel.Channel, string)
- func (self *ChannelPeekHandler) DisableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, ...)
- func (self *ChannelPeekHandler) EnableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, ...)
- func (self *ChannelPeekHandler) IsEnabled() bool
- func (self *ChannelPeekHandler) Rx(msg *channel.Message, ch channel.Channel)
- func (self *ChannelPeekHandler) ToggleTracing(sourceType SourceType, matcher SourceMatcher, enable bool, ...)
- func (self *ChannelPeekHandler) Tx(msg *channel.Message, ch channel.Channel)
- type Controller
- type EventHandler
- type Filter
- type PipeToggleMatchers
- type Source
- type SourceMatcher
- type SourceType
- type ToggleApplyResult
- type ToggleApplyResultImpl
- type ToggleResult
- type ToggleVerbosity
- type XgressPeekHandler
- func (self *XgressPeekHandler) Close(*xgress.Xgress)
- func (self *XgressPeekHandler) DisableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, ...)
- func (self *XgressPeekHandler) EnableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, ...)
- func (self *XgressPeekHandler) IsEnabled() bool
- func (self *XgressPeekHandler) Rx(x *xgress.Xgress, payload *xgress.Payload)
- func (self *XgressPeekHandler) ToggleTracing(sourceType SourceType, matcher SourceMatcher, enable bool, ...)
- func (self *XgressPeekHandler) Tx(x *xgress.Xgress, payload *xgress.Payload)
Constants ¶
This section is empty.
Variables ¶
View Source
var EventHandlerRegistry = concurrenz.CopyOnWriteSlice[EventHandler]{}
Functions ¶
func AddTraceEventHandler ¶
func AddTraceEventHandler(handler EventHandler)
func NewPipeToggleMatchers ¶
func NewPipeToggleMatchers(request *trace_pb.TogglePipeTracesRequest) (*PipeToggleMatchers, *ToggleResult)
func RemoveTraceEventHandler ¶
func RemoveTraceEventHandler(handler EventHandler)
Types ¶
type ChannelPeekHandler ¶
type ChannelPeekHandler struct {
// contains filtered or unexported fields
}
func NewChannelPeekHandler ¶
func NewChannelPeekHandler(appId string, ch channel.Channel, controller Controller) *ChannelPeekHandler
func (*ChannelPeekHandler) Close ¶
func (self *ChannelPeekHandler) Close(channel.Channel)
func (*ChannelPeekHandler) Connect ¶
func (*ChannelPeekHandler) Connect(channel.Channel, string)
func (*ChannelPeekHandler) DisableTracing ¶
func (self *ChannelPeekHandler) DisableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult)
func (*ChannelPeekHandler) EnableTracing ¶
func (self *ChannelPeekHandler) EnableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult)
func (*ChannelPeekHandler) IsEnabled ¶
func (self *ChannelPeekHandler) IsEnabled() bool
func (*ChannelPeekHandler) Rx ¶
func (self *ChannelPeekHandler) Rx(msg *channel.Message, ch channel.Channel)
func (*ChannelPeekHandler) ToggleTracing ¶
func (self *ChannelPeekHandler) ToggleTracing(sourceType SourceType, matcher SourceMatcher, enable bool, handler EventHandler, resultChan chan<- ToggleApplyResult)
func (*ChannelPeekHandler) Tx ¶
func (self *ChannelPeekHandler) Tx(msg *channel.Message, ch channel.Channel)
type Controller ¶
type Controller interface { Source AddSource(source Source) RemoveSource(source Source) EventHandler }
func NewController ¶
func NewController(closeNotify <-chan struct{}) Controller
type EventHandler ¶
type EventHandler interface {
Accept(event *trace_pb.ChannelMessage)
}
EventHandler is for types wishing to receive trace messages
func NewChannelSink ¶
func NewChannelSink(ch channel.Channel) EventHandler
type Filter ¶
type Filter interface {
Accept(event *trace_pb.ChannelMessage) bool
}
func NewAllowAllFilter ¶
func NewAllowAllFilter() Filter
func NewExcludeFilter ¶
func NewIncludeFilter ¶
type PipeToggleMatchers ¶
type PipeToggleMatchers struct { AppMatcher SourceMatcher PipeMatcher SourceMatcher }
type Source ¶
type Source interface { EnableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult) DisableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult) }
type SourceMatcher ¶
func NewSourceMatcher ¶
func NewSourceMatcher(regex *regexp.Regexp) SourceMatcher
type ToggleApplyResult ¶
type ToggleApplyResult interface { IsMatched() bool GetMessage() string Append(result *ToggleResult, verbosity ToggleVerbosity) }
type ToggleApplyResultImpl ¶
func (*ToggleApplyResultImpl) Append ¶
func (applyResult *ToggleApplyResultImpl) Append(result *ToggleResult, verbosity ToggleVerbosity)
func (*ToggleApplyResultImpl) GetMessage ¶
func (applyResult *ToggleApplyResultImpl) GetMessage() string
func (*ToggleApplyResultImpl) IsMatched ¶
func (applyResult *ToggleApplyResultImpl) IsMatched() bool
type ToggleResult ¶
func (*ToggleResult) Append ¶
func (result *ToggleResult) Append(msg string)
type ToggleVerbosity ¶
type ToggleVerbosity int
const ( ToggleVerbosityNone ToggleVerbosity = iota ToggleVerbosityMatches ToggleVerbosityMisses ToggleVerbosityAll )
func GetVerbosity ¶
func GetVerbosity(verbosity trace_pb.TraceToggleVerbosity) ToggleVerbosity
func (ToggleVerbosity) Show ¶
func (val ToggleVerbosity) Show(matched bool) bool
type XgressPeekHandler ¶
type XgressPeekHandler struct {
// contains filtered or unexported fields
}
func NewXgressPeekHandler ¶
func NewXgressPeekHandler(appId *identity.TokenId, controller Controller) *XgressPeekHandler
func (*XgressPeekHandler) Close ¶
func (self *XgressPeekHandler) Close(*xgress.Xgress)
func (*XgressPeekHandler) DisableTracing ¶
func (self *XgressPeekHandler) DisableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult)
func (*XgressPeekHandler) EnableTracing ¶
func (self *XgressPeekHandler) EnableTracing(sourceType SourceType, matcher SourceMatcher, handler EventHandler, resultChan chan<- ToggleApplyResult)
func (*XgressPeekHandler) IsEnabled ¶
func (self *XgressPeekHandler) IsEnabled() bool
func (*XgressPeekHandler) Rx ¶
func (self *XgressPeekHandler) Rx(x *xgress.Xgress, payload *xgress.Payload)
func (*XgressPeekHandler) ToggleTracing ¶
func (self *XgressPeekHandler) ToggleTracing(sourceType SourceType, matcher SourceMatcher, enable bool, handler EventHandler, resultChan chan<- ToggleApplyResult)
Click to show internal directories.
Click to hide internal directories.