memory

package
v2.3.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName string = "memory"

Variables

This section is empty.

Functions

func NewPubSubDriver

func NewPubSubDriver(log logger.Logger, _ string) (pubsub.PubSub, error)

Types

type Plugin

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

func (*Plugin) Init

func (p *Plugin) Init(log logger.Logger) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) PSProvide

func (p *Plugin) PSProvide(key string) (pubsub.PubSub, error)

type PubSubDriver

type PubSubDriver struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*PubSubDriver) Connections

func (p *PubSubDriver) Connections(topic string, res map[string]struct{})

func (*PubSubDriver) Next

func (p *PubSubDriver) Next() (*websocketsv1.Message, error)

func (*PubSubDriver) Publish

func (p *PubSubDriver) Publish(message []byte) error

func (*PubSubDriver) PublishAsync

func (p *PubSubDriver) PublishAsync(message []byte)

func (*PubSubDriver) Subscribe

func (p *PubSubDriver) Subscribe(connectionID string, topics ...string) error

func (*PubSubDriver) Unsubscribe

func (p *PubSubDriver) Unsubscribe(connectionID string, topics ...string) error

Jump to

Keyboard shortcuts

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