message

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	// 消息Id
	UUID string
	// 元数据
	Metadata Metadata
	// 消息正文
	Payload Payload
	// 发送时间
	Time time.Time
}

func NewMessage

func NewMessage(uuid string, metadata Metadata, payload []byte) *Message

type Metadata

type Metadata map[string]string

func (Metadata) Get

func (m Metadata) Get(key string) string

Get 返回指定键的元数据值

func (Metadata) Set

func (m Metadata) Set(key, value string)

Set 设置元数据值

type Payload

type Payload []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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