Documentation ¶
Index ¶
- type Client
- func (c Client) Close() error
- func (c Client) Delete(ctx context.Context, key string) error
- func (c Client) Get(ctx context.Context, key string, value models.Model) error
- func (c Client) List(ctx context.Context, prefix string) (keys []string, err error)
- func (c Client) Set(ctx context.Context, key string, value models.Model) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Option ¶
type Option struct { // DBRedisAddress is the address of the redis database Address string `default:"localhost:6379"` // Password is the password of the redis database Password string // Username is the username of the redis database Username string // DB is the database number of the redis database DB int `default:"0"` // MaxRetries is the maximum number of retries before giving up MaxRetries int `default:"3"` // DialTimeout is the maximum number of retries before giving up DialTimeout int `default:"5"` // ReadTimeout is the maximum number of retries before giving up ReadTimeout int `default:"3"` // WriteTimeout is the maximum number of retries before giving up WriteTimeout int `default:"3"` CertFile string KeyFile string CAFile string }
Click to show internal directories.
Click to hide internal directories.