bus

package
v0.0.0-...-6a8978f Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPERATE_LOG_TOPIC = "log.operate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

发布者

func NewPublisher

func NewPublisher(addr []string) *Publisher

func (*Publisher) Pub

func (b *Publisher) Pub(ctx context.Context, record *operate.OperateLog) error

往总线上发布数据

type Subscriber

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

订阅者 应该放在那里启动, 服务启动的时候就启动

func NewSubscriber

func NewSubscriber(addr []string) *Subscriber

func (*Subscriber) Sub

func (b *Subscriber) Sub(ctx context.Context)

订阅总线数据

Jump to

Keyboard shortcuts

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