inmem

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "inmem"
)

Variables

This section is empty.

Functions

func New

func New(tree config.Tree) (pubsub.PubSub, error)

Types

type Config

type Config struct {
	Buffer int `toml:"buffer"`
}

type Inmem

type Inmem struct {
	Config Config
	// contains filtered or unexported fields
}

func (*Inmem) Close

func (ps *Inmem) Close() error

func (*Inmem) Drain

func (ps *Inmem) Drain()

func (*Inmem) Publish

func (ps *Inmem) Publish(
	ctx context.Context,
	ch string,
	data []byte,
) error

func (*Inmem) Start

func (ps *Inmem) Start(ctx context.Context) error

func (*Inmem) Subscribe

func (ps *Inmem) Subscribe(q, ch string, h pubsub.MsgHandler) error

Jump to

Keyboard shortcuts

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