local

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueue

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

func NewMessageQueue

func NewMessageQueue(logger *zap.Logger, bufferSize int64, persistent bool, isBlocked bool) *MessageQueue

func (*MessageQueue) Publish

func (m *MessageQueue) Publish(topic string, pOpts ...miface.PubOption) error

func (*MessageQueue) Subscribe

func (m *MessageQueue) Subscribe(
	ctx context.Context,
	topic string,
	handler miface.SubResponseHandler,
	_ ...miface.SubOption,
) (miface.Subscription, error)

type Subscription

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

func CreateSubscription

func CreateSubscription(
	ctx context.Context,
	topic string,
	handler miface.SubResponseHandler,
	subscriber message.Subscriber,
) (*Subscription, error)

func (*Subscription) IsValid

func (s *Subscription) IsValid() bool

func (*Subscription) Unsubscribe

func (s *Subscription) Unsubscribe() error

Jump to

Keyboard shortcuts

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