pubsub

package
v0.0.0-...-37004a0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(lc fx.Lifecycle, c config.Config, log *log.Logger) (*Client, error)

func (*Client) Publish

func (c *Client) Publish(ctx context.Context, topic Topic, msg any) error

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, topic Topic, subscriberID string, handler func(ctx context.Context, msg *pubsub.Message)) error

type Topic

type Topic string
const (
	TopicInbox  Topic = "activityhub_inbox_queue"
	TopicOutbox Topic = "activityhub_outbox_queue"
)

func (Topic) String

func (t Topic) String() string

Jump to

Keyboard shortcuts

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