entity

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT 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 {
	Group    string
	ID       uint64
	Priority int64
	Content  string
	Metadata map[string]string

	QueueName     string        `json:"QueueName,omitempty"`
	QueueType     string        `json:"QueueType,omitempty"`
	QueueSettings QueueSettings `json:"QueueSettings,omitempty"`
}

func MessageFromBytes

func MessageFromBytes(data []byte) (*Message, error)

func (*Message) ToBytes

func (m *Message) ToBytes() ([]byte, error)

func (*Message) UpdatePriority

func (m *Message) UpdatePriority(newPriority int64)

type QueueConfig

type QueueConfig struct {
	Name     string
	Type     string
	Settings QueueSettings
}

func QueueConfigFromBytes

func QueueConfigFromBytes(data []byte) (*QueueConfig, error)

func (*QueueConfig) ToBytes

func (qc *QueueConfig) ToBytes() ([]byte, error)

type QueueSettings added in v0.6.0

type QueueSettings struct {
	Strategy   string `json:"strategy,omitempty"`
	MaxUnacked int    `json:"max_unacked,omitempty"`
}

Jump to

Keyboard shortcuts

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