package
0.0.0-20231027131641-93b1e7503408
Repository: https://github.com/lightstar/golib.git
Documentation: pkg.go.dev

# Packages

Package rdidgen provides implementation of id generation using redis server.

# Functions

MustNewClient function creates new redis client with provided options and panics on any error.
NewClient function creates new redis client with provided options.
WithAddress option applies provided redis server address.
WithConfig option retrieves configuration from provided configuration service.
WithDealFunc option applies provided custom dial function instead of the default one.
WithIdleTimeout option applies provided timeout in seconds after which idle connections will be dropped away.
WithMaxIdle option applies provided maximum number of idle redis connections in the pool.

# Constants

DefAddress is the default redis server address.
DefIdleTimeout is the default timeout in seconds after which idle connections will be dropped away.
DefMaxIdle is the default maximum number of idle redis connections in the pool.

# Variables

ErrNoValues error is returned by Scan and ScanStruct reply methods when there are no values returned by redis server, i.e.

# Structs

Client structure provides redis client functionality.
Config structure with client's configuration.
Conn structure represents connection to redis server retrieved from the pool.
MultiCall structure is a bulk or transaction processing context.
Reply structure represents some reply returned from redis server.
TransConn structure represents connection to redis server retrieved from the pool.

# Interfaces

ConfigService interface used to obtain configuration from somewhere into some specific structure.

# Type aliases

MultiCallFunc is a function that will be wrapped in bulk and transaction processing.
Option function that is fed to NewClient and MustNewClient.