message

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package message provides everything related to messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	common.Common

	// Data to be published.
	Data any `json:"data"`
}

Message definition.

func MustNew

func MustNew(topic string, data any) *Message

MustNew creates a new message, panicking if there's an error.

func New

func New(topic string, data any) (*Message, error)

New creates a new message.

func (*Message) Process

func (m *Message) Process(b any, v any) error

Process the content of the message `b` into `v`.

Jump to

Keyboard shortcuts

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