widgets

package
v0.0.0-...-a3392df Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type string    `json:"type"`
	ID   string    `json:"id,omitempty"`
	TS   time.Time `json:"ts"`
}

Event represents a widget change event.

type RedisNotifier

type RedisNotifier struct {
	RDB     *redis.Client
	Channel string
}

RedisNotifier publishes widget events to a Redis channel.

func NewRedisNotifier

func NewRedisNotifier(rdb *redis.Client, channel string) *RedisNotifier

NewRedisNotifier constructs a RedisNotifier.

func (*RedisNotifier) NotifyReload

func (n *RedisNotifier) NotifyReload(ctx context.Context) error

NotifyReload publishes a reload event.

func (*RedisNotifier) NotifyWidgetChanged

func (n *RedisNotifier) NotifyWidgetChanged(ctx context.Context, id string) error

NotifyWidgetChanged publishes an upsert event.

func (*RedisNotifier) NotifyWidgetRemoved

func (n *RedisNotifier) NotifyWidgetRemoved(ctx context.Context, id string) error

NotifyWidgetRemoved publishes a remove event.

Jump to

Keyboard shortcuts

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