event

package
v0.0.0-...-839ea1c Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package event contains incoming notifications for parties

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	user.Token
	Reply() chan Reply
}

Client in a room

type Envelope

type Envelope interface {
	Topic() string
	Serialize() ([]byte, error)
}

Envelope that you format to be transported

type InboxChan

type InboxChan <-chan comms.Message

InboxChan is a read only message channel

type Join

type Join interface {
	Query
	Client
}

Join implements Event

type Leave

type Leave interface {
	Query
	user.Token
}

Leave implements Event

type PostChan

type PostChan chan<- comms.Message

PostChan is a write only message channel

type Query

type Query interface {
	Envelope
}

Query incoming

type Reply

type Reply interface {
	// TODO Probably useless
	OriginID() int64
	// write only - send to room
	Room() PostChan
	// ready only - receive from room
	Inbox() InboxChan
}

Reply is the expected reply from Room

Jump to

Keyboard shortcuts

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