package
0.6.0
Repository: https://github.com/distributedio/titan.git
Documentation: pkg.go.dev

# Functions

Append a value to a key.
Auth verifies the client.
AutoCommit commits to database after run a txn command.
BitCount counts the number of set bits (population counting) in a string.
BitField performs arbitrary bitfield integer operations on strings.
BitOp performs bitwise operations between strings.
BitPos finds first bit set or clear in a string.
BulkString replies a bulkstring when commit.
BytesArray replies a [][]byte when commit.
Call a command.
Client manages client connections.
Debug the titan server.
Decr decrements the integer value of a key by one.
DecrBy decrements the integer value of a key by the given number.
Delete removes the specified keys.
Discard flushes all previously queued commands in a transaction and restores the connection state to normal.
Echo the given string.
ErrUnKnownCommand return RedisError of the cmd.
ErrWrongArgs return RedisError of the cmd.
Exec all the commands queued in client.
Exists returns if key exists.
Expire sets a timeout on key.
ExpireAt sets an absolute timestamp to expire on key.
FlushAll cleans up all databases This function is **VERY DANGEROUS**.
FlushDB clears current db This function is **VERY DANGEROUS**.
Get the value of key.
GetBit gets the bit at offset in the string value stored at key.
GetRange increments the integer value of a keys by the given amount.
GetSet sets the string value of a key and return its old value.
HDel removes the specified fields from the hash stored at key.
HExists returns if field is an existing field in the hash stored at key.
HGet returns the value associated with field in the hash stored at key.
HGetAll returns all fields and values of the hash stored at key.
HIncrBy increments the number stored at field in the hash stored at key by increment.
HIncrByFloat increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment.
HKeys returns all field names in the hash stored at key.
HLen returns the number of fields contained in the hash stored at key.
HMGet returns the values associated with the specified fields in the hash stored at key.
HMSet sets the specified fields to their respective values in the hash stored at key.
HScan incrementally iterate hash fields and associated values.
HSet sets field in the hash stored at key to value.
HSetNX sets field in the hash stored at key to value, only if field does not yet exist.
HStrLen returns the string length of the value associated with field in the hash stored at key.
HVals returns all values in the hash stored at key.
Incr increments the integer value of a key by one.
IncrBy increments the integer value of a key by the given amount.
IncrByFloat increments the float value of a key by the given amount.
Info returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans.
Integer replies in integer when commit.
Keys returns all keys matching pattern.
LIndex get an element from a list by its index.
LInsert insert an element before or after another element in a list.
LLen get the length of a list.
LPop removes and returns the first element of the list stored at key.
LPush inserts an entry to the head of the list.
LPushx prepend a value to a list, only if the list exists.
LRange get a range of elements from a list.
LRem remove elements from a list.
LSet set the value of an element in a list by its index.
LTrim trim a list to the specified range.
MGet returns the values of all specified key.
Monitor streams back every command processed by the Titan server.
MSet sets the given keys to their respective values.
MSetNx et multiple keys to multiple values,only if none of the keys existTODO bug.
Multi starts a transaction which will block subsequent commands until 'exec'.
NewExecutor news a Executor.
NullBulkString replies a null bulkstring when commit.
Object inspects the internals of Redis Objects.
Persist removes the existing timeout on key, turning the key from volatile to persistent.
PExpire works exactly like expire but the time to live of the key is specified in milliseconds instead of seconds.
PExpireAt has the same effect and semantic as expireAt, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.
Ping the server.
PSetEx sets the value and expiration in milliseconds of a key.
PTTL likes TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.
Quit asks the server to close the connection.
RandomKey returns a random key from the currently selected database.
RedisCommand returns Array reply of details about all Redis commands.
RPop remove and get the last element in a list.
RPopLPush remove the last element in a list, prepend it to another list and return it.
RPush append one or multiple values to a list.
RPushx append a value to a list, only if the list exists.
SAdd adds the specified members to the set stored at key.
Scan incrementally iterates the key space.
SCard returns the set cardinality (number of elements) of the set stored at key.
SDiff returns the members of the set resulting from the difference between the first set and all the successive sets.
Select the logical database.
Set key to hold the string value.
SetBit sets or clears the bit at offset in the string value stored at key.
SetEx sets the value and expiration of a key KEY_NAME TIMEOUT VALUE.
SetNx sets the value of a key ,only if the key does not exist.
SetRange overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
SimpleString replies a simplestring when commit.
SInter returns the members of the set resulting from the intersection of all the given sets.
SIsmember returns if member is a member of the set stored at key.
SMembers returns all the members of the set value stored at key.
SMove movies member from the set at source to the set at destination.
SPop removes and returns one or more random elements from the set value store at key.
SRem removes the specified members from the set stored at key.
Strlen returns the length of the string value stored at key.
SUnion returns the members of the set resulting from the union of all the given sets.
SwapDB swaps two Redis databases.
Time returns the server time.
Token token create through key server namespace create time.
Touch alters the last access time of a key(s).
TTL returns the remaining time to live of a key that has a timeout.
TxnCall calls a command with transaction, it is used with multi/exec.
Type returns the string representation of the type of the value stored at key.
Unwatch flushes all the previously watched keys for a transaction.
No description provided by the author
Watch starts a transaction, watch is a global transaction and is not key associated(this is different from redis).
ZAdd adds the specified members with scores to the sorted set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
Command flags.
ScanMaxCount is the max limitation of a single scan.
UnKnownCommandStr is the command not find.
WrongArgs is for wrong number of arguments error.

# Variables

ErrAuthInvalid invalid password.
ErrAuthUnSet Client sent AUTH, but no password is set.
ErrBitInteger bit is not an integer or out of range.
ErrBitInvaild the bit argument must be 1 or 0.
ErrBitOffset bit offset is not an integer or out of range.
ErrBitOp not must be called with a single source key.
ErrDiscard without multi.
ErrEmptyArray error.
ErrExec exec without multi.
ErrExpire expire time in set.
ErrExpire expire time in setex.
ErrFloat value is not a valid float.
ErrIndex offset is out of range.
ErrInteger value is not an integer or out of range.
ErrInvalidDB invalid DB index.
ErrMaximum allows the maximum size of a string.
argument min or max isn't float.
ErrMSet wrong number of arguments for MSET.
ErrMultiNested indicates a nested multi command which is not allowed.
ErrNoAuth authentication required.
ErrNoSuchKey reteurn on lset for key which no exist.
ErrOffset offset is out of range.
ErrReturnType return data type error.
ErrSyntax syntax error.
ErrTypeMismatch Operation against a key holding the wrong kind of value.
MaxRangeInteger max index in setrange command.
OK is the simple string "OK" returned to client.
Queued is the simple string "QUEUED" return to client.

# Structs

Base token base msg.
Constraint is the rule of command.
Context is the runtime context of a command.
Desc describes a command with constraints.
Executor executes a command.
Statistic for the redis command.

# Type aliases

Command is a redis command implementation.
Flag is the redis command flag.
No description provided by the author
OnCommit returns by TxnCommand and will be called after a transaction being committed.
RedisError defines the redis protocol error.
TxnCommand runs a command in transaction.