Documentation ¶
Index ¶
- Variables
- func PullFor[T any](ctx context.Context, app App, key string, done <-chan struct{}, ...)
- func SubscribeFor[T any](ctx context.Context, app App, channel string, handler func(T, error)) func(context.Context) error
- type App
- func (a App) Delete(ctx context.Context, keys ...string) error
- func (a App) Exclusive(ctx context.Context, name string, timeout time.Duration, ...) (acquired bool, err error)
- func (a App) Load(ctx context.Context, key string) ([]byte, error)
- func (a App) LoadMany(ctx context.Context, keys ...string) ([]string, error)
- func (a App) Ping() error
- func (a App) Publish(ctx context.Context, channel string, value any) error
- func (a App) Pull(ctx context.Context, key string, done <-chan struct{}, ...)
- func (a App) Push(ctx context.Context, key string, value any) error
- func (a App) Scan(ctx context.Context, pattern string, pageSize int64) (output []string, err error)
- func (a App) Store(ctx context.Context, key string, value any, duration time.Duration) error
- func (a App) Subscribe(ctx context.Context, channel string) (<-chan *redis.Message, func(context.Context) error)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSubscriber = errors.New("no subscriber for channel")
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config, prometheusRegisterer prometheus.Registerer, tracer trace.Tracer) App
func (App) Pull ¶ added in v4.44.0
func (a App) Pull(ctx context.Context, key string, done <-chan struct{}, handler func(string, error))
Pull tasks from a list.
Click to show internal directories.
Click to hide internal directories.