mq

package
v0.0.0-...-abf0de2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Name() string
	// Put put event into mq
	Put(ctx context.Context, evt *types.Event) error
	// Get get event from mq
	//
	// you can get event from evtChan,
	// if evtChan is closed, then you can get err from errChan.
	Get(ctx context.Context, topic types.EventTopic) (evtChan <-chan *types.Event, errChan <-chan error)
	// Commit mark event as done
	//
	// not all mq support this feature.
	Commit(ctx context.Context, evt *types.Event) error
}

Interface is MQ backend for event engine

func WithMockMQ

func WithMockMQ() (Interface, error)

func WithRedisMQ

func WithRedisMQ(optfs ...redis.OptFunc) (Interface, error)

Directories

Path Synopsis
Package mock is mock mq for unit test
Package mock is mock mq for unit test
Package redis mq base on redis
Package redis mq base on redis

Jump to

Keyboard shortcuts

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