Skip to content

Latest commit

 

History

History
128 lines (74 loc) · 2.54 KB

actor.md

File metadata and controls

128 lines (74 loc) · 2.54 KB

Table of Contents

constructor

the Actor manages the various message passing functions and provides an interface for the containers to use

Parameters

  • opts Object
    • opts.id ID the UUID of the Actor
    • opts.module Object the module this actor was created from
    • opts.state Object the state of the module
    • opts.storage Object the actor's persistent storage
    • opts.hypervisor Object the instance of the hypervisor
    • opts.nonce Number
    • opts.Container Function the module constructor and arguments

shutdown

Runs the shutdown routine for the actor

startup

Runs the startup routine for the actor

runMessage

run the Actor with a given message

Parameters

  • message object the message to run
  • method String which method to run

Returns Promise

incrementTicks

updates the number of ticks that the actor has run

Parameters

  • count Number the number of ticks to add

newActor

creates an actor from a module and code

Parameters

Returns ActorRef

createModule

creates a modref from a module and code

Parameters

Returns ModuleRef

createActor

creates an actor from a modref

Parameters

  • modRef ModuleRef the modref

Returns ActorRef

send

sends a message

Parameters

  • message Message the message