Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBusy = errors.New("failed to acquire events semaphore")
)
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback struct {
Item ItemCallback
}
type Config ¶
func DefaultConfig ¶
func DefaultConfig(scale cachescale.Func) Config
type ItemCallback ¶
type ItemCallback struct { ProcessEV func(ev inter.LlrSignedEpochVote) error ProcessER func(er ier.LlrIdxFullEpochRecord) error ReleasedEV func(ev inter.LlrSignedEpochVote, peer string, err error) ReleasedER func(er ier.LlrIdxFullEpochRecord, peer string, err error) CheckEV func(ev inter.LlrSignedEpochVote, checked func(error)) }
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor is responsible for processing incoming events
func New ¶
func New(itemsSemaphore *datasemaphore.DataSemaphore, cfg Config, callback Callback) *Processor
New creates an event processor
func (*Processor) Overloaded ¶
Overloaded returns true if too much items are being processed
func (*Processor) Stop ¶
func (f *Processor) Stop()
Stop interrupts the processor, canceling all the pending operations. Stop waits until all the internal goroutines have finished.
func (*Processor) TasksCount ¶
Click to show internal directories.
Click to hide internal directories.