message

package
v0.0.0-...-d79959a Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexTopic       = 0
	IndexContentType = 1
	IndexContent     = 2
)

Variables

This section is empty.

Functions

func Unserialize

func Unserialize(data []byte, target interface{})

Types

type Handler

type Handler func(msg Message)

type Message

type Message struct {
	Topic       string
	ContentType string
	Content     SerializedValue
}

func NewMessage

func NewMessage(topic string, content any) Message

func NewMessageFromFrames

func NewMessageFromFrames(frames []string) (Message, error)

type SerializedValue

type SerializedValue []byte

func Serialize

func Serialize(data any) SerializedValue

func (SerializedValue) To

func (d SerializedValue) To(target interface{})

func (SerializedValue) ToInt

func (d SerializedValue) ToInt() int

func (SerializedValue) ToString

func (d SerializedValue) ToString() string

Jump to

Keyboard shortcuts

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