yjs

package
v0.0.0-...-8444db5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeSubscribe   = "subscribe"
	MessageTypeUnsubscribe = "unsubscribe"
	MessageTypePublish     = "publish"
	MessageTypePing        = "ping"
	MessageTypePong        = "pong"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnSet

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

func NewConnSet

func NewConnSet() *ConnSet

func (*ConnSet) Add

func (s *ConnSet) Add(conn *websocket.Conn)

func (*ConnSet) Remove

func (s *ConnSet) Remove(conn *websocket.Conn)

func (*ConnSet) SendTo

func (s *ConnSet) SendTo(message interface{}, conns ...*websocket.Conn) error

type Plugin

type Plugin struct{}

func NewPlugin

func NewPlugin() *Plugin

func (*Plugin) HookMountRoutes

func (p *Plugin) HookMountRoutes(ctx context.Context, r chi.Router) error

func (*Plugin) PluginName

func (p *Plugin) PluginName() string

func (*Plugin) PluginVersion

func (p *Plugin) PluginVersion() string

type Subscribers

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

func NewSubscribers

func NewSubscribers() *Subscribers

func (*Subscribers) Add

func (s *Subscribers) Add(topic string, conn *websocket.Conn)

func (*Subscribers) All

func (s *Subscribers) All(topic string) []*websocket.Conn

func (*Subscribers) Remove

func (s *Subscribers) Remove(topic string, conn *websocket.Conn)

type Subscriptions

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

func NewSubscriptions

func NewSubscriptions() *Subscriptions

func (*Subscriptions) Add

func (s *Subscriptions) Add(topic string)

func (*Subscriptions) All

func (s *Subscriptions) All() []string

func (*Subscriptions) Remove

func (s *Subscriptions) Remove(topic string)

Jump to

Keyboard shortcuts

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