Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventSchemaMessageBatch ¶
type EventSchemaMessageBatch struct { Index int Message *proto.EventSchemaMessage Jobs []*jobsdb.JobT }
A batch of jobs that share the same schema.
type EventSchemaMessageBatcher ¶
type EventSchemaMessageBatcher struct {
// contains filtered or unexported fields
}
EventSchemaMessageBatcher batches jobs by their schema.
func NewEventSchemaMessageBatcher ¶
func NewEventSchemaMessageBatcher(transformer transformer.Transformer) *EventSchemaMessageBatcher
NewEventSchemaMessageBatcher creates a new batcher.
func (*EventSchemaMessageBatcher) Add ¶
func (sb *EventSchemaMessageBatcher) Add(job *jobsdb.JobT) error
Add adds a job to the batcher after transforming it to an [EventSchemaMessage]. If the message is already in the batcher, the two messages will be merged to one.
func (*EventSchemaMessageBatcher) GetMessageBatches ¶
func (sb *EventSchemaMessageBatcher) GetMessageBatches() []*EventSchemaMessageBatch
GetMessageBatches returns the message batches in the order they were added.
Click to show internal directories.
Click to hide internal directories.