wsadapter

package
v1.0.2-0...-2da3d3e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Add(client Client) error
	Remove(clientID string) error
	Broadcast(msg wsmessage.Message) error
	Metadata(clientID string) (string, bool)
	SetMetadata(clientID string, metadata string) bool
	Emit(clientID string, msg wsmessage.Message) error
	Clients() (map[string]string, error)
	Size() (int, error)
	Close() error
}

type Client

type Client interface {
	ID() string
	WriteChannel() chan<- wsmessage.Message
	Metadata() string
	SetMetadata(metadata string)
}

Jump to

Keyboard shortcuts

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