v1

package
v0.0.0-...-36d8597 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Message Queue

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataBus

type DataBus struct {
	// contains filtered or unexported fields
}

DataBus abstract type

func (*DataBus) Use

func (mq *DataBus) Use(ctx context.Context, log logger.Logger) (MQ, error)

Use return implementation of MQ

type MQ

type MQ interface {
	// setting
	Init(context.Context) error
	io.Closer // Closer is the interface that wraps the basic Close method.

	// Pub/Sub a pattern
	Publish(ctx context.Context, target string, message query.Message) error
	Subscribe(target string, message query.Response) error
	UnSubscribe(target string) error
}

MQ - common interface of DataBus

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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