Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertError(err error) error
- func GetError(prefix string) error
- func GetPrefix(err error) string
- func SetError(prefix string, err error)
- func WriteError(conn redcon.Conn, err error)
- type Auth
- type ClusterCommands
- type ClusterMembers
- type ClusterRoutingTable
- type DMapCommands
- type Decr
- type Del
- type DelEntry
- type Destroy
- type Expire
- type GenericCommands
- type Get
- type GetEntry
- type GetPut
- type Incr
- type IncrByFloat
- type InternalCommands
- type LengthOfPart
- type Lock
- type LockLease
- type MoveFragment
- type PExpire
- type PLockLease
- type PSubscribe
- type Ping
- type PubSubChannels
- type PubSubCommands
- type PubSubNumpat
- type PubSubNumsub
- type Publish
- type PublishInternal
- type Put
- type PutEntry
- type Scan
- type Stats
- type Subscribe
- type Unlock
- type UpdateRouting
Constants ¶
View Source
const DefaultScanCount = 10
View Source
const StatusOK = "OK"
Variables ¶
View Source
var Cluster = &ClusterCommands{
RoutingTable: "cluster.routingtable",
Members: "cluster.members",
}
View Source
var DMap = &DMapCommands{
Get: "dm.get",
GetEntry: "dm.getentry",
Put: "dm.put",
PutEntry: "dm.putentry",
Del: "dm.del",
DelEntry: "dm.delentry",
Expire: "dm.expire",
PExpire: "dm.pexpire",
Destroy: "dm.destroy",
Incr: "dm.incr",
Decr: "dm.decr",
GetPut: "dm.getput",
IncrByFloat: "dm.incrbyfloat",
Lock: "dm.lock",
Unlock: "dm.unlock",
LockLease: "dm.locklease",
PLockLease: "dm.plocklease",
Scan: "dm.scan",
}
View Source
var ErrInvalidArgument = errors.New("invalid argument")
View Source
var Generic = &GenericCommands{
Ping: "ping",
Stats: "stats",
Auth: "auth",
}
View Source
var GenericError = "ERR"
View Source
var Internal = &InternalCommands{
MoveFragment: "internal.node.movefragment",
UpdateRouting: "internal.node.updaterouting",
LengthOfPart: "internal.node.lengthofpart",
}
View Source
var PubSub = &PubSubCommands{
PubSub: "pubsub",
Publish: "publish",
PublishInternal: "publish.internal",
Subscribe: "subscribe",
PSubscribe: "psubscribe",
PubSubChannels: "pubsub channels",
PubSubNumpat: "pubsub numpat",
PubSubNumsub: "pubsub numsub",
}
Functions ¶
func ConvertError ¶
func WriteError ¶
Types ¶
type Auth ¶ added in v0.7.0
type Auth struct {
Password string
}
Auth represents a structure for authentication containing a password.
func NewAuth ¶ added in v0.7.0
NewAuth creates and returns a new Auth instance initialized with the given password.
func ParseAuthCommand ¶ added in v0.7.0
ParseAuthCommand parses a redcon.Command to create an Auth instance and validates command arguments.
type ClusterCommands ¶
type ClusterMembers ¶
type ClusterMembers struct{}
func NewClusterMembers ¶
func NewClusterMembers() *ClusterMembers
func ParseClusterMembers ¶
func ParseClusterMembers(cmd redcon.Command) (*ClusterMembers, error)
type ClusterRoutingTable ¶
type ClusterRoutingTable struct{}
func NewClusterRoutingTable ¶
func NewClusterRoutingTable() *ClusterRoutingTable
func ParseClusterRoutingTable ¶
func ParseClusterRoutingTable(cmd redcon.Command) (*ClusterRoutingTable, error)
type DMapCommands ¶
type Destroy ¶
func NewDestroy ¶
type GenericCommands ¶
type IncrByFloat ¶
func NewIncrByFloat ¶
func NewIncrByFloat(dmap, key string, delta float64) *IncrByFloat
func ParseIncrByFloatCommand ¶
func ParseIncrByFloatCommand(cmd redcon.Command) (*IncrByFloat, error)
type InternalCommands ¶
type LengthOfPart ¶
func NewLengthOfPart ¶
func NewLengthOfPart(partID uint64) *LengthOfPart
func ParseLengthOfPartCommand ¶
func ParseLengthOfPartCommand(cmd redcon.Command) (*LengthOfPart, error)
func (*LengthOfPart) SetReplica ¶
func (l *LengthOfPart) SetReplica() *LengthOfPart
type LockLease ¶
func NewLockLease ¶
type MoveFragment ¶
type MoveFragment struct {
Payload []byte
}
func NewMoveFragment ¶
func NewMoveFragment(payload []byte) *MoveFragment
func ParseMoveFragmentCommand ¶
func ParseMoveFragmentCommand(cmd redcon.Command) (*MoveFragment, error)
type PLockLease ¶
func NewPLockLease ¶
func NewPLockLease(dmap, key, token string, timeout int64) *PLockLease
func ParsePLockLeaseCommand ¶
func ParsePLockLeaseCommand(cmd redcon.Command) (*PLockLease, error)
type PSubscribe ¶
type PSubscribe struct {
Patterns []string
}
func NewPSubscribe ¶
func NewPSubscribe(patterns ...string) *PSubscribe
func ParsePSubscribeCommand ¶
func ParsePSubscribeCommand(cmd redcon.Command) (*PSubscribe, error)
type PubSubChannels ¶
type PubSubChannels struct {
Pattern string
}
func NewPubSubChannels ¶
func NewPubSubChannels() *PubSubChannels
func ParsePubSubChannelsCommand ¶
func ParsePubSubChannelsCommand(cmd redcon.Command) (*PubSubChannels, error)
func (*PubSubChannels) Command ¶
func (ps *PubSubChannels) Command(ctx context.Context) *redis.SliceCmd
func (*PubSubChannels) SetPattern ¶
func (ps *PubSubChannels) SetPattern(pattern string) *PubSubChannels
type PubSubCommands ¶
type PubSubNumpat ¶
type PubSubNumpat struct{}
func NewPubSubNumpat ¶
func NewPubSubNumpat() *PubSubNumpat
func ParsePubSubNumpatCommand ¶
func ParsePubSubNumpatCommand(cmd redcon.Command) (*PubSubNumpat, error)
type PubSubNumsub ¶
type PubSubNumsub struct {
Channels []string
}
func NewPubSubNumsub ¶
func NewPubSubNumsub(channels ...string) *PubSubNumsub
func ParsePubSubNumsubCommand ¶
func ParsePubSubNumsubCommand(cmd redcon.Command) (*PubSubNumsub, error)
type Publish ¶
func NewPublish ¶
type PublishInternal ¶
func NewPublishInternal ¶
func NewPublishInternal(channel, message string) *PublishInternal
func ParsePublishInternalCommand ¶
func ParsePublishInternalCommand(cmd redcon.Command) (*PublishInternal, error)
type Put ¶
type PutEntry ¶
func NewPutEntry ¶
type Scan ¶
func (*Scan) SetReplica ¶
type UpdateRouting ¶
func NewUpdateRouting ¶
func NewUpdateRouting(payload []byte, coordinatorID uint64) *UpdateRouting
func ParseUpdateRoutingCommand ¶
func ParseUpdateRoutingCommand(cmd redcon.Command) (*UpdateRouting, error)
Click to show internal directories.
Click to hide internal directories.