pubsub

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ClosingValue = "<<CLOSING>>"

ClosingValue - Sent over a subscribe channel when its closing

View Source
const TopicCommunityConfig = "policyserv_community_config_changed"
View Source
const TopicHellban = "policyserv_hellban_by_community"
View Source
const TopicRoomCommunityId = "policyserv_room_community_id_changed"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close() error

	Publish(ctx context.Context, topic string, val string) error
	Subscribe(ctx context.Context, topic string) (<-chan string, error)
	Unsubscribe(ctx context.Context, ch <-chan string) error
}

type PostgresPubsub

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

func (*PostgresPubsub) Close

func (p *PostgresPubsub) Close() error

func (*PostgresPubsub) Publish

func (p *PostgresPubsub) Publish(ctx context.Context, topic string, val string) error

func (*PostgresPubsub) Subscribe

func (p *PostgresPubsub) Subscribe(ctx context.Context, topic string) (<-chan string, error)

func (*PostgresPubsub) Unsubscribe

func (p *PostgresPubsub) Unsubscribe(ctx context.Context, ch <-chan string) error

type PostgresPubsubConnectionConfig

type PostgresPubsubConnectionConfig struct {
	Uri                  string
	MinReconnectInterval time.Duration
	MaxReconnectInterval time.Duration
}

Jump to

Keyboard shortcuts

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