Documentation ¶
Index ¶
- type AppGroup
- func (g *AppGroup) AddSink(sink Sink, in chan<- *events.Envelope) bool
- func (g *AppGroup) BroadcastError(msg *events.Envelope)
- func (g *AppGroup) BroadcastMessage(msg *events.Envelope)
- func (g *AppGroup) Exists(sink Sink) bool
- func (g *AppGroup) IsEmpty() bool
- func (g *AppGroup) RecentLogsSink(id string) *DumpSink
- func (g *AppGroup) RemoveAllSinks()
- func (g *AppGroup) RemoveSink(sink Sink) bool
- func (g *AppGroup) Sink(id string) Sink
- type DumpSink
- type EnvelopeSender
- type GroupedSinks
- func (group *GroupedSinks) Broadcast(appId string, msg *events.Envelope)
- func (group *GroupedSinks) CloseAndDelete(sink Sink) bool
- func (group *GroupedSinks) DeleteAll()
- func (group *GroupedSinks) DumpFor(appId string) *DumpSink
- func (group *GroupedSinks) RegisterAppSink(in chan<- *events.Envelope, sink Sink) bool
- type HealthRegistrar
- type MessageRouter
- type MetricBatcher
- type MetricClient
- type Sink
- type SinkManager
- type SinkManagerMetrics
- type SinkWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppGroup ¶
type AppGroup struct {
// contains filtered or unexported fields
}
func NewAppGroup ¶
func NewAppGroup( droppedMetric *metricemitter.Counter, errorMetric *metricemitter.Counter, ) *AppGroup
func (*AppGroup) BroadcastError ¶
func (*AppGroup) BroadcastMessage ¶
func (*AppGroup) RecentLogsSink ¶
func (*AppGroup) RemoveAllSinks ¶
func (g *AppGroup) RemoveAllSinks()
func (*AppGroup) RemoveSink ¶
type DumpSink ¶
type DumpSink struct {
// contains filtered or unexported fields
}
func NewDumpSink ¶
func (*DumpSink) Identifier ¶
type EnvelopeSender ¶
EnvelopeSender is the interface the MessageRouter uses to send envelopes read from the diode.
type GroupedSinks ¶
func NewGroupedSinks ¶
func NewGroupedSinks(mc MetricClient) *GroupedSinks
func (*GroupedSinks) Broadcast ¶
func (group *GroupedSinks) Broadcast(appId string, msg *events.Envelope)
func (*GroupedSinks) CloseAndDelete ¶
func (group *GroupedSinks) CloseAndDelete(sink Sink) bool
func (*GroupedSinks) DeleteAll ¶
func (group *GroupedSinks) DeleteAll()
func (*GroupedSinks) DumpFor ¶
func (group *GroupedSinks) DumpFor(appId string) *DumpSink
func (*GroupedSinks) RegisterAppSink ¶
func (group *GroupedSinks) RegisterAppSink(in chan<- *events.Envelope, sink Sink) bool
type HealthRegistrar ¶
type MessageRouter ¶
type MessageRouter struct {
// contains filtered or unexported fields
}
MessageRouter consumes from a diode and sends envelopes to all recipients passed to the NewMessageRouter constructor.
func NewMessageRouter ¶
func NewMessageRouter(e ...EnvelopeSender) *MessageRouter
NewMessageRouter is the preferred means of constructing a MessageRouter.
func (*MessageRouter) Start ¶
func (r *MessageRouter) Start(incomingLog *diodes.ManyToOneEnvelope)
Start begins an infinite loop which reads from the diode and sends any received envelopes to the MessageRouter's senders.
type MetricBatcher ¶
type MetricBatcher interface {
BatchIncrementCounter(name string)
}
type MetricClient ¶
type MetricClient interface { NewCounter(name string, opts ...metricemitter.MetricOption) *metricemitter.Counter NewGauge(name, unit string, opts ...metricemitter.MetricOption) *metricemitter.Gauge }
MetricClient creates new Counter and Gauge metrics to be emitted periodically.
type SinkManager ¶
type SinkManager struct {
// contains filtered or unexported fields
}
SinkManager provides an in memory store of recent logs.
func NewSinkManager ¶
func NewSinkManager( maxRetainedLogMessages uint32, sinkTimeout time.Duration, metricClient MetricClient, health HealthRegistrar, ) *SinkManager
NewSinkManager creates a SinkManager.
func (*SinkManager) RecentLogsFor ¶
func (sm *SinkManager) RecentLogsFor(appID string) []*events.Envelope
RecentLogsFor provides a fixed number of logs for an application ID.
func (*SinkManager) RegisterSink ¶
func (sm *SinkManager) RegisterSink(sink Sink) bool
RegisterSink sink adds a new sink for the sink manager to manage.
FIXME This method should be private. Nothing calls it except for private functions in this file.
func (*SinkManager) SendTo ¶
func (sm *SinkManager) SendTo(appID string, msg *events.Envelope)
SendTo sends an envelope to the registered sinks for a specified application ID.
func (*SinkManager) UnregisterSink ¶
func (sm *SinkManager) UnregisterSink(sink Sink)
UnregisterSink removes a particular sink from the sink manager.
FIXME This method should be private. Nothing calls it except for private functions in this file.
type SinkManagerMetrics ¶
type SinkManagerMetrics struct {
// contains filtered or unexported fields
}
func NewSinkManagerMetrics ¶
func NewSinkManagerMetrics(mc MetricClient) *SinkManagerMetrics
func (*SinkManagerMetrics) Dec ¶
func (s *SinkManagerMetrics) Dec(sink Sink)
func (*SinkManagerMetrics) Inc ¶
func (s *SinkManagerMetrics) Inc(sink Sink)