Documentation ¶
Index ¶
- type BufferedMessageReceiver
- func (b *BufferedMessageReceiver) HandleMessage(m message.Message, redactedMsg []byte)
- func (b *BufferedMessageReceiver) IsEnabled() bool
- func (b *BufferedMessageReceiver) Next(filters *Filters) (line string, ok bool)
- func (b *BufferedMessageReceiver) SetEnabled(e bool) bool
- func (b *BufferedMessageReceiver) Start()
- func (b *BufferedMessageReceiver) Stop()
- type Filters
- type MessageReceiver
- type NoopMessageReceiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedMessageReceiver ¶
type BufferedMessageReceiver struct {
// contains filtered or unexported fields
}
BufferedMessageReceiver handles in coming log messages and makes them available for diagnostics
func NewBufferedMessageReceiver ¶
func NewBufferedMessageReceiver() *BufferedMessageReceiver
NewBufferedMessageReceiver creates a new MessageReceiver
func (*BufferedMessageReceiver) HandleMessage ¶
func (b *BufferedMessageReceiver) HandleMessage(m message.Message, redactedMsg []byte)
HandleMessage buffers a message for diagnostic processing
func (*BufferedMessageReceiver) IsEnabled ¶
func (b *BufferedMessageReceiver) IsEnabled() bool
IsEnabled returns the enabled state of the message receiver
func (*BufferedMessageReceiver) Next ¶
func (b *BufferedMessageReceiver) Next(filters *Filters) (line string, ok bool)
Next pops the next buffered event off the input channel formatted as a string
func (*BufferedMessageReceiver) SetEnabled ¶
func (b *BufferedMessageReceiver) SetEnabled(e bool) bool
SetEnabled start collecting log messages for diagnostics. Returns true if state was successfully changed
func (*BufferedMessageReceiver) Start ¶
func (b *BufferedMessageReceiver) Start()
Start opens new input channel
func (*BufferedMessageReceiver) Stop ¶
func (b *BufferedMessageReceiver) Stop()
Stop closes the input channel
type Filters ¶
type Filters struct { Name string `json:"name"` Type string `json:"type"` Source string `json:"source"` }
Filters for processing log messages
type MessageReceiver ¶
MessageReceiver interface to handle messages for diagnostics
type NoopMessageReceiver ¶
type NoopMessageReceiver struct{}
NoopMessageReceiver for cases where diagnosing messages is unsupported or not needed (serverless, tests)
func (*NoopMessageReceiver) HandleMessage ¶
func (n *NoopMessageReceiver) HandleMessage(m message.Message, redactedMsg []byte)
HandleMessage does nothing with the message