actors

package
v2.0.2-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package actors is used to hold common actors that can be utilized from outside packages.

Package actors is used to hold common actors that can be utilized from outside packages.

Package actors is used to hold common actors that can be utilized from outside packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor interface {
	// StartActor starts the actor and initializes its variables.
	StartActor() interface{}
	// Tell sends a message to the actor and requests an operation that requires no response.
	Tell(structs.Message)
	// Ask sends a message to the actor and requests an operation that requires a response.
	Ask(structs.Message) structs.Message
	// contains filtered or unexported methods
}

Actor defines a common interface for all actors to follow.

type DHT22

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

DHT22 is a model of what is needed to use a DHT22 Temperature Sensor.

func (*DHT22) Ask

func (dht22 *DHT22) Ask(msg structs.Message) structs.Message

Ask sends a message to the actor and requests an operation that requires a response.

func (*DHT22) StartActor

func (dht22 *DHT22) StartActor() *DHT22

StartActor starts the actor and initializes its variables.

func (*DHT22) Tell

func (dht22 *DHT22) Tell(msg structs.Message)

Tell sends a message to the actor and requests an operation that requires no response.

type Relay

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

Relay is a model of what is needed to use a relay.

func (*Relay) Ask

func (relay *Relay) Ask(msg structs.Message) structs.Message

Ask sends a message to the actor and requests an operation that requires a response.

func (*Relay) StartActor

func (relay *Relay) StartActor() *Relay

StartActor starts the actor and initializes its variables.

func (*Relay) Tell

func (relay *Relay) Tell(msg structs.Message)

Tell sends a message to the actor and requests an operation that requires no response.

Jump to

Keyboard shortcuts

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