Documentation ¶ Index ¶ Constants type Envelope type Inbox func NewInbox[T constraints.Signed](size T) *Inbox func (slf *Inbox) Push(env Envelope) func (slf *Inbox) Start(processor Processor) func (slf *Inbox) Stop() error type Processor type Scheduler func NewScheduler(throughput int) Scheduler Constants ¶ View Source const ( IDLE int32 = iota RUNNING ) Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Envelope ¶ type Envelope struct { Msg any } type Inbox ¶ type Inbox struct { // contains filtered or unexported fields } func NewInbox ¶ func NewInbox[T constraints.Signed](size T) *Inbox func (*Inbox) Push ¶ func (slf *Inbox) Push(env Envelope) func (*Inbox) Start ¶ func (slf *Inbox) Start(processor Processor) func (*Inbox) Stop ¶ func (slf *Inbox) Stop() error type Processor ¶ type Processor interface { Invoke(envelopes []Envelope) } type Scheduler ¶ type Scheduler interface { Schedule(fn func()) Throughput() int } func NewScheduler ¶ func NewScheduler(throughput int) Scheduler Source Files ¶ View all Source files envelope.go inbox.go processor.go scheduler.go Click to show internal directories. Click to hide internal directories.