producer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExampleTopic = "example" // 示例消息队列topic
)

Variables

This section is empty.

Functions

func PublishExample

func PublishExample(ctx context.Context, msg *ExampleMsg) error

PublishExample 发布示例消息

func SubscribeExample

func SubscribeExample(ctx context.Context, fn func(ctx context.Context, msg *ExampleMsg) error) error

Types

type ExampleMsg

type ExampleMsg struct {
	Time int64
}

func ParseExampleMsg

func ParseExampleMsg(msg *broker2.Message) (*ExampleMsg, error)

Jump to

Keyboard shortcuts

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