memory

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 9 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) CheckHealth added in v0.2.1

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

CheckHealth implements health.Checker interface.

func (*Broker) Close added in v0.1.2

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

Close implements broker.Broker interface.

func (*Broker) Open added in v0.1.8

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

Open implements broker.Broker interface.

func (*Broker) Publish

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

Publish implements broker.Broker interface.

func (*Broker) Subscribe

func (br *Broker) Subscribe(ctx context.Context, 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