redis

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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