gochannel

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

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 implements the cqrs.Broker interface as a wrapper around watermills go channel implementation

func New

func New() *Broker

New creates a new Broker

func (Broker) Close

func (b Broker) Close() error

Close noop

func (Broker) Publish

func (b Broker) Publish(topic cqrs.RouteKey, messages ...cqrs.Message) error

Publish publishes (N) cqrs.Message(s) over the given topic

func (Broker) Subscribe

func (b Broker) Subscribe(ctx context.Context, topic cqrs.RouteKey, _ *time.Duration) (<-chan cqrs.Envelope, error)

Subscribe attaches to the given topic and returns a channel to receive cqrs.Message(s)

Jump to

Keyboard shortcuts

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