Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLogEntry = errors.New("invalid log entry: both event and attempt are required")
ErrInvalidLogEntry is returned when a LogEntry is missing required fields.
Functions ¶
func NewMessageHandler ¶
func NewMessageHandler(logger *logging.Logger, batchAdder BatchAdder) consumer.MessageHandler
func WithQueue ¶
func WithQueue(queueConfig *mqs.QueueConfig) func(opts *LogMQOption)
Types ¶
type BatchAdder ¶ added in v0.13.0
BatchAdder is the interface for adding messages to a batch processor.
type BatchProcessor ¶ added in v0.13.0
type BatchProcessor struct {
// contains filtered or unexported fields
}
BatchProcessor batches log entries and writes them to the log store.
func NewBatchProcessor ¶ added in v0.13.0
func NewBatchProcessor(ctx context.Context, logger *logging.Logger, logStore LogStore, cfg BatchProcessorConfig) (*BatchProcessor, error)
NewBatchProcessor creates a new batch processor for log entries.
func (*BatchProcessor) Shutdown ¶ added in v0.13.0
func (bp *BatchProcessor) Shutdown()
Shutdown gracefully shuts down the batch processor.
type BatchProcessorConfig ¶ added in v0.13.0
BatchProcessorConfig configures the batch processor.
type LogMQ ¶
type LogMQ struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...func(opts *LogMQOption)) *LogMQ
type LogMQOption ¶
type LogMQOption struct {
QueueConfig *mqs.QueueConfig
}
Click to show internal directories.
Click to hide internal directories.