redis

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Nil = redis.Nil

Variables

This section is empty.

Functions

func Key

func Key(args ...string) string

Types

type Config

type Config struct {
	Address  string `json:"address"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Secure   bool   `json:"secure,omitempty"`
}

type Counter

type Counter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(prefix string) *Counter

func (*Counter) Decr

func (c *Counter) Decr(ctx context.Context, key, path string, delta int64) (int64, error)

func (*Counter) Delete

func (c *Counter) Delete(ctx context.Context, key string) error

func (*Counter) Incr

func (c *Counter) Incr(ctx context.Context, key, path string, delta int64) (int64, error)

func (*Counter) Read

func (c *Counter) Read(ctx context.Context, key, path string) (int64, error)

func (*Counter) Reset

func (c *Counter) Reset(ctx context.Context, key, path string) error

Jump to

Keyboard shortcuts

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