subscription

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidChannel = errors.New("Expected channel, received empty string")
View Source
var ErrInvalidID = errors.New("Expected ID, received empty string")

Functions

This section is empty.

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Active

func (registry *Registry) Active() []string

func (*Registry) Get

func (registry *Registry) Get(id string) *Subscription

func (*Registry) Register

func (registry *Registry) Register(sub *Subscription)

func (*Registry) Remove

func (registry *Registry) Remove(id string)

type Subscription

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

func New

func New(sub_id string, channel string, buffer_size uint) (*Subscription, error)

func (*Subscription) Active

func (subscription *Subscription) Active() bool

func (*Subscription) Close

func (subscription *Subscription) Close()

func (*Subscription) Decode

func (subscription *Subscription) Decode(ctx context.Context, value any) error

func (*Subscription) Deliver

func (subscription *Subscription) Deliver(ctx context.Context, payload app.Payload) error

func (*Subscription) Next

func (subscription *Subscription) Next(ctx context.Context) ([]byte, error)

Jump to

Keyboard shortcuts

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