pubsub

package
v0.0.0-...-2e485aa Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventMessage

type EventMessage struct {
	User       string  `json:"user"`
	Event      string  `json:"event"`
	NumGuesses *uint16 `json:"num_guesses,omitempty"`
	GuessCount *uint16 `json:"guess_count,omitempty"`
}

type PubSub

type PubSub interface {
	Ack(ctx context.Context, realm types.RealmID, tenant string, ids []string) error
	Publish(ctx context.Context, realm types.RealmID, tenant string, event EventMessage) error
	// If there are no pending messages, implementations of Pull may choose to
	// wait a reasonable (~30 seconds) amount of time to see if a new message
	// turns up.
	Pull(ctx context.Context, realm types.RealmID, tenant string, maxRows uint16) ([]responses.TenantLogEntry, error)
}

func NewMemPubSub

func NewMemPubSub() PubSub

func NewPubSub

func NewPubSub(ctx context.Context, provider types.ProviderName, opts types.ProviderOptions, realmID types.RealmID) (PubSub, error)

Jump to

Keyboard shortcuts

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