realtime

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidChannel

func ValidChannel(channel string) bool

Types

type Bus

type Bus interface {
	Publish(ctx context.Context, subject string, data []byte) error
}

type HeaderBus

type HeaderBus interface {
	PublishWithHeaders(ctx context.Context, subject string, headers map[string]string, data []byte) error
}

type Publication

type Publication struct {
	Data any `json:"data"`
}

type Publisher

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

func NewPublisher

func NewPublisher(bus Bus) *Publisher

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, channel string, payload any) error

Jump to

Keyboard shortcuts

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