ably

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilConfig = errors.New("ably config is nil")
)

Functions

This section is empty.

Types

type ChannelPublisher

type ChannelPublisher interface {
	Publish(ctx context.Context, channel, name string, data any) error
}

ChannelPublisher abstracts Ably channel publishing for testability.

type Config

type Config struct {
	APIKey string `env:"API_KEY" json:"apiKey"`
}

Config holds Ably async notifier configuration.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

type Notifier

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

Notifier is an Ably-backed AsyncNotifier.

func NewNotifier

func NewNotifier(cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider) (*Notifier, error)

NewNotifier creates a new Ably-backed AsyncNotifier.

func (*Notifier) Close

func (n *Notifier) Close() error

Close is a no-op for the Ably notifier (REST client, no persistent connection).

func (*Notifier) Publish

func (n *Notifier) Publish(ctx context.Context, channel string, event *asyncnotifications.Event) error

Publish sends an event to the given Ably channel.

Jump to

Keyboard shortcuts

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