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.
Click to show internal directories.
Click to hide internal directories.