feat: use postgres
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package worker
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
// StreamPublisher abstracts the subset of the Redis Streams API used by the
|
||||
// route publishers to emit one outbound stream entry. The default
|
||||
// implementation in production wiring is `*redis.Client`. Tests substitute
|
||||
// an in-memory fake.
|
||||
type StreamPublisher interface {
|
||||
// XAdd appends one entry to the configured stream. Implementations must
|
||||
// honour `args.MaxLen` plus `args.Approx == true` for approximate trimming
|
||||
// when the caller sets them.
|
||||
XAdd(ctx context.Context, args *redis.XAddArgs) *redis.StringCmd
|
||||
}
|
||||
Reference in New Issue
Block a user