adapter

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

nolint: wrapcheck

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoRedisAdapter

type GoRedisAdapter struct {
	goredis.UniversalClient
}

func UseGoRedis added in v1.1.0

func UseGoRedis(client goredis.UniversalClient) *GoRedisAdapter

func (*GoRedisAdapter) Del

func (a *GoRedisAdapter) Del(ctx context.Context, key string) error

func (*GoRedisAdapter) Get

func (a *GoRedisAdapter) Get(ctx context.Context, key string) ([]byte, error)

func (*GoRedisAdapter) Set

func (a *GoRedisAdapter) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

type RedigoAdapter added in v1.1.0

type RedigoAdapter struct {
	*redigo.Pool
}

func UseRedigo added in v1.1.0

func UseRedigo(pool *redigo.Pool) *RedigoAdapter

func (*RedigoAdapter) Del added in v1.1.0

func (a *RedigoAdapter) Del(ctx context.Context, key string) error

func (*RedigoAdapter) Get added in v1.1.0

func (a *RedigoAdapter) Get(ctx context.Context, key string) ([]byte, error)

func (*RedigoAdapter) Set added in v1.1.0

func (a *RedigoAdapter) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL