Documentation ¶
Index ¶
- Variables
- func PullFor[T any](ctx context.Context, app App, key string, handler func(T, error))
- 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) DeletePattern(ctx context.Context, pattern string) (err error)
- func (a App) Enabled() bool
- 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(ctx context.Context) error
- func (a App) Publish(ctx context.Context, channel string, value any) error
- func (a App) Pull(ctx context.Context, key string, handler func(string, error))
- func (a App) Push(ctx context.Context, key string, value any) error
- func (a App) Scan(ctx context.Context, pattern string, output chan<- string, pageSize int64) 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) DeletePattern ¶ added in v4.48.1
Click to show internal directories.
Click to hide internal directories.