mq

package
v0.0.0-...-e8513ac Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clienter

type Clienter interface {
	Publish(ctx context.Context, sub string, msg interface{}) error
	Subscribe(topic string, h SubscribeHandler, queue ...string) error
}

type Publisher

type Publisher interface {
	Publish(ctx context.Context, msg interface{}) error
}

func NewPublisher

func NewPublisher(topic string, client Clienter) Publisher

type SubscribeHandler

type SubscribeHandler func(ctx context.Context, data []byte) error

type Subscriber

type Subscriber interface {
	Register(topic string, h SubscribeHandler, queue ...string) error
}

func NewSubscriber

func NewSubscriber(c Clienter) Subscriber

Jump to

Keyboard shortcuts

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