internal

package
v0.0.0-...-2f7b494 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	sync.RWMutex
	*Mailbox
	// contains filtered or unexported fields
}

Context is the internal implementation of both an actor.Context (and an actor.Address). It also serves as the foundation for the internal implementation of system.System

func MakeContext

func MakeContext(supervisor actor.Address) *Context

MakeContext instantiates a new Context

func (*Context) Address

func (c *Context) Address() actor.Address

Address returns the actor.Address that is managed by this Context

func (*Context) EqualTo

func (c *Context) EqualTo(other actor.Address) bool

EqualTo compares the two actor.Address instances for equality

func (*Context) Spawn

func (c *Context) Spawn(f actor.Factory, args ...actor.Arg) actor.Address

Spawn instantiates a new actor.Actor as a child of this Context

func (*Context) Supervisor

func (c *Context) Supervisor() actor.Address

Supervisor returns the actor.Address of the Supervisor of this Context

type Mailbox

type Mailbox struct {
	// contains filtered or unexported fields
}

Mailbox is the queueing mechanism for a local actor.Actor

func MakeMailbox

func MakeMailbox() *Mailbox

MakeMailbox instantiates a new Mailbox

func (*Mailbox) Close

func (m *Mailbox) Close()

Close the Mailbox

func (*Mailbox) Receive

func (m *Mailbox) Receive() <-chan actor.Message

Receive returns the Mailbox's receiving channel. Will usually be exposed by an actor.Context implementation that composes it in

func (*Mailbox) Send

func (m *Mailbox) Send() chan<- actor.Message

Send returns the Mailbox's sending channel. Will usually be exposed by an actor.Address implementation that composes it in

type System

type System struct {
	*Context
	system.Config
}

System is the internal implementation of system.System

func MakeSystem

func MakeSystem(cfg system.Config) *System

MakeSystem instantiates a new System

func (*System) Shutdown

func (s *System) Shutdown()

Shutdown instructs the System to stop processing Messages and to destroy all of its actor.Actor children

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL