entity

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessageProtoFromBytes added in v0.8.0

func MessageProtoFromBytes(data []byte) (*pb.Message, error)

Types

type Message

type Message struct {
	Group    string
	ID       uint64
	Priority int64
	Content  string
	Metadata map[string]string
}

func MessageFromBytes

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

func (*Message) ToBytes

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

func (*Message) ToProto added in v0.8.0

func (m *Message) ToProto() *pb.Message

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)

func (*QueueConfig) ToProto added in v0.8.0

func (qc *QueueConfig) ToProto() *pb.Queue

type QueueSettings added in v0.6.0

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

type Server added in v0.10.5

type Server struct {
	Id       string
	Addr     string
	IsLeader bool
	Suffrage string
}

Jump to

Keyboard shortcuts

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