broker

package
v2.8.18 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(ctx context.Context, topic string) <-chan Message

func Publish

func Publish(ctx context.Context, topic string, msg []byte) (string, error)

func Register

func Register(i Interface) error

Types

type Interface

type Interface interface {
	Publish(ctx context.Context, topic string, msg []byte) (string, error)
	Consume(ctx context.Context, topic string) <-chan Message
}

type Message

type Message interface {
	Payload() []byte
	Commit() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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