mvplive

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Family *ChannelFamily
	Topic  string
}

func (Channel) String

func (ch Channel) String() string

type ChannelFamily

type ChannelFamily struct {
	Name string
}

type Envelope

type Envelope struct {
	EventID  uint64
	DedupKey string
}

type Msg

type Msg struct {
	ID flake.ID
	Envelope
	Data []byte
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(opt QueueOptions) *Queue

func (*Queue) Await

func (q *Queue) Await(ctx context.Context, ch Channel, afterID flake.ID) []*Msg

func (*Queue) MessagesAfter

func (q *Queue) MessagesAfter(ch Channel, afterID flake.ID, now time.Time) []*Msg

func (*Queue) Push

func (q *Queue) Push(ch Channel, msg *Msg)

type QueueOptions

type QueueOptions struct {
	TTL                   time.Duration
	MaxMessagesPerChannel int
}

Jump to

Keyboard shortcuts

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