protoactor-go: github.com/AsynkronIT/protoactor-go/mailbox Index | Files

package mailbox

import "github.com/AsynkronIT/protoactor-go/mailbox"

Package mailbox implements mailbox queues and dispatching

Index

Package Files

bounded.go dispatcher.go doc.go log.go mailbox.go messages.go queue.go unbounded.go unbounded_lock_free.go

func SetLogLevel Uses

func SetLogLevel(level log.Level)

SetLogLevel sets the log level for the logger.

SetLogLevel is safe to call concurrently

type Dispatcher Uses

type Dispatcher interface {
    Schedule(fn func())
    Throughput() int
}

func NewDefaultDispatcher Uses

func NewDefaultDispatcher(throughput int) Dispatcher

type Inbound Uses

type Inbound interface {
    PostUserMessage(message interface{})
    PostSystemMessage(message interface{})
    Start()
}

The Inbound interface is used to enqueue messages to the mailbox

type MessageInvoker Uses

type MessageInvoker interface {
    InvokeSystemMessage(interface{})
    InvokeUserMessage(interface{})
    EscalateFailure(reason interface{}, message interface{})
}

MessageInvoker is the interface used by a mailbox to forward messages for processing

type Producer Uses

type Producer func(invoker MessageInvoker, dispatcher Dispatcher) Inbound

Producer is a function which creates a new mailbox

func Bounded Uses

func Bounded(size int, mailboxStats ...Statistics) Producer

Bounded returns a producer which creates an bounded mailbox of the specified size

func BoundedDropping Uses

func BoundedDropping(size int, mailboxStats ...Statistics) Producer

Bounded dropping returns a producer which creates an bounded mailbox of the specified size that drops front element on push

func Unbounded Uses

func Unbounded(mailboxStats ...Statistics) Producer

Unbounded returns a producer which creates an unbounded mailbox

func UnboundedLockfree Uses

func UnboundedLockfree(mailboxStats ...Statistics) Producer

UnboundedLockfree returns a producer which creates an unbounded, lock-free mailbox. This mailbox is cheaper to allocate, but has a slower throughput than the plain Unbounded mailbox.

type ResumeMailbox Uses

type ResumeMailbox struct{}

ResumeMailbox is message sent by the actor system to resume mailbox processing.

This will not be forwarded to the Receive method

type Statistics Uses

type Statistics interface {
    MailboxStarted()
    MessagePosted(message interface{})
    MessageReceived(message interface{})
    MailboxEmpty()
}

type SuspendMailbox Uses

type SuspendMailbox struct{}

SuspendMailbox is message sent by the actor system to suspend mailbox processing.

This will not be forwarded to the Receive method

Package mailbox imports 6 packages (graph) and is imported by 2 packages. Updated 2017-05-09. Refresh now. Tools for package owners.