channel

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseChannel

type BaseChannel string

type Manager

type Manager interface {
	Writer
	String() string
	Subscribe(ctx context.Context, id sharedTypes.UUID) error
	Unsubscribe(ctx context.Context, id sharedTypes.UUID)
	UnSubscribeBulk(ctx context.Context, ids sharedTypes.UUIDBatch) error
	Listen(ctx context.Context) (<-chan PubSubMessage, error)
	Close()
}

func New

func New(client redis.UniversalClient, baseChannel BaseChannel) Manager

type PubSubMessage

type PubSubMessage struct {
	Msg     string
	Channel sharedTypes.UUID
}

type Writer

type Writer interface {
	Publish(ctx context.Context, msg *sharedTypes.EditorEvent) error
	PublishVia(ctx context.Context, runner redis.Cmdable, msg *sharedTypes.EditorEvent) (*redis.IntCmd, error)
}

func NewWriter

func NewWriter(client redis.UniversalClient, baseChannel BaseChannel) Writer

Jump to

Keyboard shortcuts

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