memory

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package memory provides a message broker using memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

Broker is a memory message broker.

func New

func New() *Broker

New return new memory broker.

func (*Broker) Close added in v0.1.2

func (br *Broker) Close(ctx context.Context) error

Close implements broker.Broker interface.

func (*Broker) Connect added in v0.1.2

func (br *Broker) Connect() error

Connect implements broker.Broker interface.

func (*Broker) HealthCheck

func (br *Broker) HealthCheck() health.CheckFunc

HealthCheck implements broker.Broker interface.

func (*Broker) Publish

func (br *Broker) Publish(topic string, m *broker.Message, opts ...broker.PublishOption) error

Publish implements broker.Broker interface.

func (*Broker) Subscribe

func (br *Broker) Subscribe(topic string, h broker.Handler, opts ...broker.SubscribeOption) (broker.Subscriber, error)

Subscribe implements broker.Broker interface.

Jump to

Keyboard shortcuts

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