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 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",
}
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{
Publish: "publish",
PublishInternal: "publish.internal",
Subscribe: "subscribe",
PSubscribe: "psubscribe",
PubSubChannels: "pubsub channels",
PubSubNumpat: "pubsub numpat",
PubSubNumsub: "pubsub numsub",
}
Functions ¶
func ConvertError ¶ added in v0.5.0
func WriteError ¶ added in v0.5.0
Types ¶
type ClusterCommands ¶ added in v0.5.0
type ClusterMembers ¶ added in v0.5.0
type ClusterMembers struct{}
func NewClusterMembers ¶ added in v0.5.0
func NewClusterMembers() *ClusterMembers
func ParseClusterMembers ¶ added in v0.5.0
func ParseClusterMembers(cmd redcon.Command) (*ClusterMembers, error)
func (*ClusterMembers) Command ¶ added in v0.5.0
func (c *ClusterMembers) Command(ctx context.Context) *redis.Cmd
type ClusterRoutingTable ¶ added in v0.5.0
type ClusterRoutingTable struct{}
func NewClusterRoutingTable ¶ added in v0.5.0
func NewClusterRoutingTable() *ClusterRoutingTable
func ParseClusterRoutingTable ¶ added in v0.5.0
func ParseClusterRoutingTable(cmd redcon.Command) (*ClusterRoutingTable, error)
func (*ClusterRoutingTable) Command ¶ added in v0.5.0
func (c *ClusterRoutingTable) Command(ctx context.Context) *redis.Cmd
type DMapCommands ¶ added in v0.5.0
type DelEntry ¶ added in v0.5.0
func NewDelEntry ¶ added in v0.5.0
func ParseDelEntryCommand ¶ added in v0.5.0
func (*DelEntry) SetReplica ¶ added in v0.5.0
type Destroy ¶ added in v0.5.0
func NewDestroy ¶ added in v0.5.0
func ParseDestroyCommand ¶ added in v0.5.0
type Expire ¶ added in v0.5.0
func ParseExpireCommand ¶ added in v0.5.0
type GenericCommands ¶ added in v0.5.0
type GetEntry ¶ added in v0.5.0
func NewGetEntry ¶ added in v0.5.0
func ParseGetEntryCommand ¶ added in v0.5.0
func (*GetEntry) SetReplica ¶ added in v0.5.0
type GetPut ¶ added in v0.5.0
func ParseGetPutCommand ¶ added in v0.5.0
type IncrByFloat ¶ added in v0.5.0
func NewIncrByFloat ¶ added in v0.5.0
func NewIncrByFloat(dmap, key string, delta float64) *IncrByFloat
func ParseIncrByFloatCommand ¶ added in v0.5.0
func ParseIncrByFloatCommand(cmd redcon.Command) (*IncrByFloat, error)
func (*IncrByFloat) Command ¶ added in v0.5.0
func (i *IncrByFloat) Command(ctx context.Context) *redis.FloatCmd
type InternalCommands ¶ added in v0.5.0
type LengthOfPart ¶ added in v0.5.0
func NewLengthOfPart ¶ added in v0.5.0
func NewLengthOfPart(partID uint64) *LengthOfPart
func ParseLengthOfPartCommand ¶ added in v0.5.0
func ParseLengthOfPartCommand(cmd redcon.Command) (*LengthOfPart, error)
func (*LengthOfPart) Command ¶ added in v0.5.0
func (l *LengthOfPart) Command(ctx context.Context) *redis.IntCmd
func (*LengthOfPart) SetReplica ¶ added in v0.5.0
func (l *LengthOfPart) SetReplica() *LengthOfPart
type LockLease ¶ added in v0.5.0
func NewLockLease ¶ added in v0.5.0
func ParseLockLeaseCommand ¶ added in v0.5.0
type MoveFragment ¶ added in v0.5.0
type MoveFragment struct {
Payload []byte
}
func NewMoveFragment ¶ added in v0.5.0
func NewMoveFragment(payload []byte) *MoveFragment
func ParseMoveFragmentCommand ¶ added in v0.5.0
func ParseMoveFragmentCommand(cmd redcon.Command) (*MoveFragment, error)
func (*MoveFragment) Command ¶ added in v0.5.0
func (m *MoveFragment) Command(ctx context.Context) *redis.StatusCmd
type PExpire ¶ added in v0.5.0
func NewPExpire ¶ added in v0.5.0
func ParsePExpireCommand ¶ added in v0.5.0
type PLockLease ¶ added in v0.5.0
func NewPLockLease ¶ added in v0.5.0
func NewPLockLease(dmap, key, token string, timeout int64) *PLockLease
func ParsePLockLeaseCommand ¶ added in v0.5.0
func ParsePLockLeaseCommand(cmd redcon.Command) (*PLockLease, error)
func (*PLockLease) Command ¶ added in v0.5.0
func (p *PLockLease) Command(ctx context.Context) *redis.StatusCmd
type PSubscribe ¶ added in v0.5.0
type PSubscribe struct {
Patterns []string
}
func NewPSubscribe ¶ added in v0.5.0
func NewPSubscribe(patterns ...string) *PSubscribe
func ParsePSubscribeCommand ¶ added in v0.5.0
func ParsePSubscribeCommand(cmd redcon.Command) (*PSubscribe, error)
func (*PSubscribe) Command ¶ added in v0.5.0
func (s *PSubscribe) Command(ctx context.Context) *redis.SliceCmd
type Ping ¶ added in v0.5.0
type Ping struct {
Message string
}
func (*Ping) SetMessage ¶ added in v0.5.0
type PubSubChannels ¶ added in v0.5.0
type PubSubChannels struct {
Pattern string
}
func NewPubSubChannels ¶ added in v0.5.0
func NewPubSubChannels() *PubSubChannels
func ParsePubSubChannelsCommand ¶ added in v0.5.0
func ParsePubSubChannelsCommand(cmd redcon.Command) (*PubSubChannels, error)
func (*PubSubChannels) Command ¶ added in v0.5.0
func (ps *PubSubChannels) Command(ctx context.Context) *redis.SliceCmd
func (*PubSubChannels) SetPattern ¶ added in v0.5.0
func (ps *PubSubChannels) SetPattern(pattern string) *PubSubChannels
type PubSubCommands ¶ added in v0.5.0
type PubSubNumpat ¶ added in v0.5.0
type PubSubNumpat struct{}
func NewPubSubNumpat ¶ added in v0.5.0
func NewPubSubNumpat() *PubSubNumpat
func ParsePubSubNumpatCommand ¶ added in v0.5.0
func ParsePubSubNumpatCommand(cmd redcon.Command) (*PubSubNumpat, error)
func (*PubSubNumpat) Command ¶ added in v0.5.0
func (ps *PubSubNumpat) Command(ctx context.Context) *redis.IntCmd
type PubSubNumsub ¶ added in v0.5.0
type PubSubNumsub struct {
Channels []string
}
func NewPubSubNumsub ¶ added in v0.5.0
func NewPubSubNumsub(channels ...string) *PubSubNumsub
func ParsePubSubNumsubCommand ¶ added in v0.5.0
func ParsePubSubNumsubCommand(cmd redcon.Command) (*PubSubNumsub, error)
func (*PubSubNumsub) Command ¶ added in v0.5.0
func (ps *PubSubNumsub) Command(ctx context.Context) *redis.SliceCmd
type Publish ¶ added in v0.5.0
func NewPublish ¶ added in v0.5.0
func ParsePublishCommand ¶ added in v0.5.0
type PublishInternal ¶ added in v0.5.0
func NewPublishInternal ¶ added in v0.5.0
func NewPublishInternal(channel, message string) *PublishInternal
func ParsePublishInternalCommand ¶ added in v0.5.0
func ParsePublishInternalCommand(cmd redcon.Command) (*PublishInternal, error)
func (*PublishInternal) Command ¶ added in v0.5.0
func (p *PublishInternal) Command(ctx context.Context) *redis.IntCmd
type Put ¶ added in v0.5.0
type PutEntry ¶ added in v0.5.0
func NewPutEntry ¶ added in v0.5.0
func ParsePutEntryCommand ¶ added in v0.5.0
type Scan ¶ added in v0.5.0
func (*Scan) SetReplica ¶ added in v0.5.0
type Stats ¶ added in v0.5.0
type Stats struct {
CollectRuntime bool
}
func (*Stats) SetCollectRuntime ¶ added in v0.5.0
type Subscribe ¶ added in v0.5.0
type Subscribe struct {
Channels []string
}
func NewSubscribe ¶ added in v0.5.0
func ParseSubscribeCommand ¶ added in v0.5.0
type Unlock ¶ added in v0.5.0
func ParseUnlockCommand ¶ added in v0.5.0
type UpdateRouting ¶ added in v0.5.0
func NewUpdateRouting ¶ added in v0.5.0
func NewUpdateRouting(payload []byte, coordinatorID uint64) *UpdateRouting
func ParseUpdateRoutingCommand ¶ added in v0.5.0
func ParseUpdateRoutingCommand(cmd redcon.Command) (*UpdateRouting, error)
func (*UpdateRouting) Command ¶ added in v0.5.0
func (u *UpdateRouting) Command(ctx context.Context) *redis.StringCmd
Click to show internal directories.
Click to hide internal directories.