Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Provide ¶
Provide creates an uber/fx option and appends the queue start and stop into the fx lifecycle.
func ProvideMetrics ¶
ProvideMetrics builds the queue-related metrics and makes them available to the container.
Types ¶
type EventQueue ¶
type EventQueue struct {
// contains filtered or unexported fields
}
EventQueue processes incoming events
func (*EventQueue) ParseEvent ¶
func (e *EventQueue) ParseEvent(eventWithTime EventWithTime)
ParseEvent parses the metadata and boot-time of each event and generates metrics.
func (*EventQueue) ParseEvents ¶
func (e *EventQueue) ParseEvents()
ParseEvents goes through the queue and calls ParseEvent on each event in the queue.
func (*EventQueue) Queue ¶
func (e *EventQueue) Queue(eventWithTime EventWithTime) (err error)
Queue attempts to add a message to the queue and returns an error if the queue is full.
func (*EventQueue) Start ¶
func (e *EventQueue) Start()
func (*EventQueue) Stop ¶
func (e *EventQueue) Stop()
type EventWithTime ¶
type EventWithTime struct { Event interpreter.Event BeginTime time.Time }
EventWithTime allows for the tracking of how long an event stays in glaukos's memory.
type Measures ¶
type Measures struct { fx.In EventsQueueDepth prometheus.Gauge `name:"events_queue_depth"` EventsCount *prometheus.CounterVec `name:"events_count"` DroppedEventsCount *prometheus.CounterVec `name:"dropped_events_count"` }
Measures contains the various queue-related metrics.
type Parser ¶
type Parser interface { Parse(interpreter.Event) Name() string }
Parser is the interface that all glaukos parsers must implement.
type Queue ¶
type Queue interface {
Queue(EventWithTime) error
}
Queue is the type that processes incoming events
type TimeTrackIn ¶
type TimeTrackIn struct { fx.In TimeInMemory prometheus.Observer `name:"time_in_memory"` }
type TimeTracker ¶
TimeTracker tracks the time an event is in memory.
type TooManyRequestsErr ¶
type TooManyRequestsErr struct {
Message string
}
func (TooManyRequestsErr) Error ¶
func (e TooManyRequestsErr) Error() string
func (TooManyRequestsErr) StatusCode ¶
func (e TooManyRequestsErr) StatusCode() int