actors

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actable

type Actable interface {
	GetCollectionName() string
	GetID() string
	RegisterActions(*ActionsHandler)
}

Actable is the interface for all models implementing actor model

type Action

type Action func(context *Context) error

Action is alias for func(context *Context) error

type ActionsHandler

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

ActionsHandler used to mange callbacks for controllers

func (*ActionsHandler) RegisterAction

func (handler *ActionsHandler) RegisterAction(actionName string, action Action)

RegisterAction used to register action

type Actor

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

Actor is the base representation of actor in actor model

func (*Actor) Identifier added in v0.0.25

func (actor *Actor) Identifier() string

type Context

type Context struct {
}

Context used to represent context with data

type Event

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

type Mailboxes

type Mailboxes map[string]chan Event

Mailboxes is alias for map[string]chan Event

type Manager

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

Manager is singleton manager for actor module

func (*Manager) Broadcast added in v0.0.25

func (manager *Manager) Broadcast(actorIdentifier string, eventName string)

func (*Manager) RegisterActor

func (manager *Manager) RegisterActor(actable Actable) *Actor

RegisterActor used to creating an actor instance for model

func (*Manager) Setup

func (manager *Manager) Setup()

Setup used to setup actor manager

Jump to

Keyboard shortcuts

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