Documentation
¶
Overview ¶
Package redis holds the reference Kv and EventBus adapters over Redis (github.com/redis/go-redis/v9). Works against any Redis: local Docker, self-hosted, or managed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ThreadChannel ¶
ThreadChannel is the pub/sub channel for a thread's events. Shared with the Upstash adapter and the TypeScript package.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is an EventBus over Redis Pub/Sub.
While subscribed, it emits a bus-only HEARTBEAT notice (seq 0, never persisted) every heartbeat interval: the §2.5 watchdog pattern. Pub/sub is at-most-once, so a distributor treats heartbeats as a trigger to re-check for orphaned HITL waits.
func NewBus ¶
func NewBus(client goredis.UniversalClient, heartbeat time.Duration) *Bus
NewBus wraps a client. A zero heartbeat means one minute.