Documentation ¶
Index ¶
- func CacheGetWithSingleFight(ctx fns.Context, key string, timeout time.Duration, ...) (result json.RawMessage, err errors.CodeError)
- func CacheRem(ctx fns.Context, key string) (err errors.CodeError)
- func CacheSet(ctx fns.Context, key string, timeout time.Duration, value json.RawMessage) (err errors.CodeError)
- func Contains(ctx fns.Context, key string) (ok bool, err errors.CodeError)
- func Decr(ctx fns.Context, key string) (v int64, err errors.CodeError)
- func Expire(ctx fns.Context, param ExpireParam) (ok bool, err errors.CodeError)
- func Incr(ctx fns.Context, key string) (v int64, err errors.CodeError)
- func Lock(ctx fns.Context, param LockParam) (err errors.CodeError)
- func Persist(ctx fns.Context, key string) (ok bool, err errors.CodeError)
- func Remove(ctx fns.Context, key string) (err errors.CodeError)
- func Service() fns.Service
- func Set(ctx fns.Context, param SetParam) (err errors.CodeError)
- func TTL(ctx fns.Context, key string) (ttl time.Duration, err errors.CodeError)
- func Unlock(ctx fns.Context, key string) (err errors.CodeError)
- func ZAdd(ctx fns.Context, param ZAddParam) (err errors.CodeError)
- func ZCard(ctx fns.Context, key string) (num int64, err errors.CodeError)
- func ZRange(ctx fns.Context, param ZRangeParam) (result *json.Array, err errors.CodeError)
- func ZRem(ctx fns.Context, param ZRemParam) (ok bool, err errors.CodeError)
- func ZRemByRank(ctx fns.Context, param ZRemByRankParam) (ok bool, err errors.CodeError)
- func ZRemByScore(ctx fns.Context, param ZRemByScoreParam) (ok bool, err errors.CodeError)
- func ZRevRange(ctx fns.Context, param ZRevRangeParam) (result *json.Array, err errors.CodeError)
- func ZRevRangeByScore(ctx fns.Context, param ZRevRangeByScoreParam) (result *json.Array, err errors.CodeError)
- type Client
- type Cluster
- type Config
- type ExpireParam
- type GetResult
- type LockParam
- type MasterSlaver
- type OriginArgs
- type OriginCommandArg
- type OriginCommandResult
- type SetParam
- type Standalone
- type ZAddParam
- type ZRangeByScoreParam
- type ZRangeParam
- type ZRemByRankParam
- type ZRemByScoreParam
- type ZRemParam
- type ZRevRangeByScoreParam
- type ZRevRangeParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheGetWithSingleFight ¶ added in v0.6.0
func ZRemByRank ¶
func ZRemByScore ¶
func ZRevRangeByScore ¶
Types ¶
type Config ¶
type Config struct { MasterSlaverMode bool `json:"masterSlaverMode,omitempty"` Network string `json:"network,omitempty"` Addr []string `json:"addr,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` DB int `json:"db,omitempty"` PoolSize int `json:"poolSize,omitempty"` SSL bool `json:"ssl,omitempty"` CaFilePath string `json:"caFilePath,omitempty"` CertFilePath string `json:"certFilePath,omitempty"` KeyFilePath string `json:"keyFilePath,omitempty"` InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` }
func (*Config) CreateClient ¶
type ExpireParam ¶
type GetResult ¶ added in v0.6.0
type GetResult struct { Value json.RawMessage `json:"value,omitempty"` Has bool `json:"has,omitempty"` }
type MasterSlaver ¶
type MasterSlaver struct {
// contains filtered or unexported fields
}
func (*MasterSlaver) Close ¶
func (client *MasterSlaver) Close() (err error)
func (*MasterSlaver) Do ¶
func (client *MasterSlaver) Do(ctx context.Context, args ...interface{}) *rds.Cmd
func (*MasterSlaver) Reader ¶
func (client *MasterSlaver) Reader() (cmd rds.Cmdable)
func (*MasterSlaver) Writer ¶
func (client *MasterSlaver) Writer() (cmd rds.Cmdable)
type OriginArgs ¶
type OriginArgs struct {
// contains filtered or unexported fields
}
func (*OriginArgs) Append ¶
func (args *OriginArgs) Append(v interface{}) (err error)
func (*OriginArgs) MarshalJSON ¶
func (args *OriginArgs) MarshalJSON() (p []byte, err error)
func (*OriginArgs) UnmarshalJSON ¶
func (args *OriginArgs) UnmarshalJSON(p []byte) (err error)
type OriginCommandArg ¶
type OriginCommandArg struct { Name string `json:"name,omitempty"` Args OriginArgs `json:"args,omitempty"` }
func NewOriginCommandArg ¶
func NewOriginCommandArg(name string) *OriginCommandArg
func (*OriginCommandArg) AppendParams ¶
func (arg *OriginCommandArg) AppendParams(params ...interface{}) (err error)
func (*OriginCommandArg) MapToRedisDoArgs ¶
func (arg *OriginCommandArg) MapToRedisDoArgs() (v []interface{}, err error)
type OriginCommandResult ¶
type OriginCommandResult json.RawMessage
func Do ¶
func Do(ctx fns.Context, param OriginCommandArg) (result OriginCommandResult, err errors.CodeError)
func (OriginCommandResult) As ¶
func (result OriginCommandResult) As(v interface{}) (err error)
As map to github.com/go-redis/redis/v8 result value
type SetParam ¶
type SetParam struct { Key string `json:"key,omitempty"` Value json.RawMessage `json:"value,omitempty"` Expiration time.Duration `json:"expiration,omitempty"` }
type Standalone ¶
type Standalone struct {
// contains filtered or unexported fields
}
func (*Standalone) Close ¶
func (client *Standalone) Close() (err error)
func (*Standalone) Do ¶
func (client *Standalone) Do(ctx context.Context, args ...interface{}) *rds.Cmd
func (*Standalone) Reader ¶
func (client *Standalone) Reader() (cmd rds.Cmdable)
func (*Standalone) Writer ¶
func (client *Standalone) Writer() (cmd rds.Cmdable)
type ZAddParam ¶
type ZAddParam struct { Key string `json:"key,omitempty"` Score float64 `json:"score,omitempty"` Value json.RawMessage `json:"value,omitempty"` }
type ZRangeByScoreParam ¶
type ZRangeParam ¶
type ZRemByRankParam ¶
type ZRemByScoreParam ¶
type ZRemParam ¶
type ZRemParam struct { Key string `json:"key,omitempty"` Member json.RawMessage `json:"min,omitempty"` }
type ZRevRangeByScoreParam ¶
type ZRevRangeParam ¶
Click to show internal directories.
Click to hide internal directories.