actors

package
v0.0.0-...-6503a0d Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conn *websocket.Conn, coordinator actors.PID) *Client

func (*Client) PostStop

func (s *Client) PostStop(ctx context.Context) error

PostStop handles post shutdown process

func (*Client) PreStart

func (s *Client) PreStart(ctx context.Context) error

PreStart handles pre-start process

func (*Client) Receive

func (s *Client) Receive(ctx actors.ReceiveContext)

Receive handle messages sent to the server

type Coordinator

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

func NewCoordinator

func NewCoordinator() *Coordinator

NewCoordinator creates a new instance of Coordinator

func (*Coordinator) PostStop

func (s *Coordinator) PostStop(ctx context.Context) error

PostStop implements actors.Actor.

func (*Coordinator) PreStart

func (s *Coordinator) PreStart(ctx context.Context) error

PreStart implements actors.Actor.

func (*Coordinator) Receive

func (s *Coordinator) Receive(ctx actors.ReceiveContext)

Receive implements actors.Actor.

type Room

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

Room represents the room

func NewRoom

func NewRoom(name string) *Room

NewRoom creates a new Room

func (*Room) PostStop

func (r *Room) PostStop(ctx context.Context) error

PostStop implements actors.Actor.

func (*Room) PreStart

func (r *Room) PreStart(ctx context.Context) error

PreStart implements actors.Actor.

func (*Room) Receive

func (r *Room) Receive(ctx actors.ReceiveContext)

Receive implements actors.Actor.

Jump to

Keyboard shortcuts

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