Help us shape the future of Go! Take the 2026 Go Developer Survey

process

package
v2.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer() *consumer

Types

type Eventbus

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

func NewEventbus

func NewEventbus() *Eventbus

func (*Eventbus) Close

func (eb *Eventbus) Close() error

Close 停止监听

func (*Eventbus) Publish

func (eb *Eventbus) Publish(ctx context.Context, topic string, payload any) error

Publish 发布事件

func (*Eventbus) Subscribe

func (eb *Eventbus) Subscribe(ctx context.Context, topic string, handler internal.EventHandler) error

Subscribe 订阅事件

func (*Eventbus) Unsubscribe

func (eb *Eventbus) Unsubscribe(ctx context.Context, topic string, handler internal.EventHandler) error

Unsubscribe 取消订阅

Jump to

Keyboard shortcuts

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