redis

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage is interface structure

func New

func New(config *config.ConfigData) *Storage

New func implements the storage interface for fmcsa_svr (https://github.com/pschlump/fmcsa_svr)

func (*Storage) Add

func (s *Storage) Add(key string, count int64)

func (*Storage) Close

func (s *Storage) Close() error

Close the storage connection

func (*Storage) Get

func (s *Storage) Get(key string) int64

func (*Storage) Init

func (s *Storage) Init() error

Init client storage. Uses:

RedisConnectHost string `json:"redis_host" default:"$ENV$REDIS_HOST"`
RedisConnectAuth string `json:"redis_auth" default:"$ENV$REDIS_AUTH"`
RedisConnectPort string `json:"redis_port" default:"6379"`
RedisCluster string `json:"redis_cluster" default:"no"`

func (*Storage) Set

func (s *Storage) Set(key string, count int64)

Jump to

Keyboard shortcuts

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