Documentation ¶
Index ¶
- func ScriptTypeToScript(scriptType ScriptType) (string, ie.ServerError)
- type RedigoClient
- func (client *RedigoClient) Del(ctx context.Context, keys ...string) error
- func (client *RedigoClient) Eval(ctx context.Context, script string, keys []string, args []interface{}) (interface{}, error)
- func (client *RedigoClient) Get(ctx context.Context, key string) (interface{}, error)
- func (client *RedigoClient) MGet(ctx context.Context, keys []string) ([]interface{}, error)
- func (client *RedigoClient) MSet(ctx context.Context, keys []string, values []interface{}) error
- func (client *RedigoClient) Set(ctx context.Context, key string, value interface{}) error
- type ScriptType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScriptTypeToScript ¶
func ScriptTypeToScript(scriptType ScriptType) (string, ie.ServerError)
ScriptTypeToScript will get the script for a ScriptType.
Types ¶
type RedigoClient ¶
RedigoClient is a Redis client implementation using Redigo.
func NewRedigoClient ¶
func NewRedigoClient(url string, maxConnections int) (*RedigoClient, error)
NewRedigoClient will create a new RedigoClient.
func (*RedigoClient) Del ¶
func (client *RedigoClient) Del(ctx context.Context, keys ...string) error
Del will run the Redis DEL command.
func (*RedigoClient) Eval ¶
func (client *RedigoClient) Eval(ctx context.Context, script string, keys []string, args []interface{}) (interface{}, error)
Eval will run the Redis EVAL command.
func (*RedigoClient) Get ¶
func (client *RedigoClient) Get(ctx context.Context, key string) (interface{}, error)
Get will run the Redis GET command.
func (*RedigoClient) MGet ¶
func (client *RedigoClient) MGet(ctx context.Context, keys []string) ([]interface{}, error)
MGet will run the Redis MGET command.
type ScriptType ¶
type ScriptType int
ScriptType is an enum.
const ( // ScriptTypeSet will set a namespaced resource. ScriptTypeSet ScriptType = iota // ScriptTypeGet will get a namespaced resource. ScriptTypeGet // ScriptTypeGetAll will get all of a namespaced resource. ScriptTypeGetAll // ScriptTypeRemove will remove a namespaced resource. ScriptTypeRemove // ScriptTypeRemoveAll will remove all of a namespaced resource. ScriptTypeRemoveAll // ScriptTypePeek is the script type for the peek script. ScriptTypePeek // ScriptTypeCheck is the script type for the check script. ScriptTypeCheck // ScriptTypeFinish is the script type for the finish script. ScriptTypeFinish )
Click to show internal directories.
Click to hide internal directories.