Documentation ¶
Index ¶
- Constants
- func GetChannelAndTopicFromStreamKey(streamKey string) (channel, topic string)
- func HashKey(id []byte, flake uint64) uint64
- func JitterBackoff(min, max time.Duration, attempt int) time.Duration
- func JsonDecode[T map[string]any | map[string]string](data string, m *T) error
- func MakeDynamicKey(prefix, channel string) string
- func MakeLogicKey(prefix string) string
- func MakeStatusKey(prefix, channel, topic, id string) string
- func MakeStreamKey(subType btype.SubscribeType, prefix, channel, topic string) string
- func MakeZSetKey(prefix, channel, topic string) string
- func RetryInfo(ctx context.Context, f func() error, retry int) (i int, err error)
- type BaseClient
- func (t *BaseClient) ClientList(ctx context.Context) ([]map[string]any, error)
- func (t *BaseClient) Clients(ctx context.Context) (map[string]any, error)
- func (t *BaseClient) CommandStats(ctx context.Context) ([]map[string]any, error)
- func (t *BaseClient) DbSize(ctx context.Context) (int64, error)
- func (t *BaseClient) Info(ctx context.Context) (map[string]string, error)
- func (t *BaseClient) KeySpace(ctx context.Context) ([]map[string]any, error)
- func (t *BaseClient) Keys(ctx context.Context, key string) ([]string, error)
- func (t *BaseClient) Memory(ctx context.Context) (map[string]any, error)
- func (t *BaseClient) Monitor(ctx context.Context) (string, error)
- func (t *BaseClient) NodeId(ctx context.Context) string
- func (t *BaseClient) Nodes(ctx context.Context) []Node
- func (t *BaseClient) Object(ctx context.Context, queueName string) (objstr *ObjectStruct, err error)
- func (t *BaseClient) Persistence(ctx context.Context) (map[string]any, error)
- func (t *BaseClient) Server(ctx context.Context) (map[string]any, error)
- func (t *BaseClient) Stats(ctx context.Context) (map[string]any, error)
- func (t *BaseClient) ZCard(ctx context.Context, key string) (int64, error)
- type Client
- type ClusterClient
- type Commands
- type IClient
- type ICommand
- type IInfo
- type INode
- type Key
- type Node
- type ObjectStruct
Constants ¶
View Source
const (
// BeanqLogGroup it's for beanq-logic-log,multiple consumers can consume those data
BeanqLogGroup = "beanq-log-group"
)
Variables ¶
This section is empty.
Functions ¶
func GetChannelAndTopicFromStreamKey ¶
GetChannelAndTopicFromStreamKey get channel and topic
func MakeDynamicKey ¶
MakeDynamicKey create key for dynamic
func MakeLogicKey ¶
func MakeStatusKey ¶
MakeStatusKey create key for type string
func MakeStreamKey ¶
func MakeStreamKey(subType btype.SubscribeType, prefix, channel, topic string) string
MakeStreamKey create key for type stream
func MakeZSetKey ¶
MakeZSetKey create redis key for type sorted set
Types ¶
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func (*BaseClient) ClientList ¶
func (*BaseClient) CommandStats ¶
func (*BaseClient) Object ¶
func (t *BaseClient) Object(ctx context.Context, queueName string) (objstr *ObjectStruct, err error)
func (*BaseClient) Persistence ¶
type ClusterClient ¶
type ClusterClient struct { IClient // contains filtered or unexported fields }
type ICommand ¶
type ICommand interface { Keys(ctx context.Context, key string) ([]string, error) Object(ctx context.Context, queueName string) (*ObjectStruct, error) ClientList(ctx context.Context) ([]map[string]any, error) ZCard(ctx context.Context, key string) (int64, error) }
ICommand redis commands
type IInfo ¶
type IInfo interface { KeySpace(ctx context.Context) ([]map[string]any, error) Memory(ctx context.Context) (map[string]any, error) CommandStats(ctx context.Context) ([]map[string]any, error) Persistence(ctx context.Context) (map[string]any, error) Server(ctx context.Context) (map[string]any, error) Clients(ctx context.Context) (map[string]any, error) Stats(ctx context.Context) (map[string]any, error) Monitor(ctx context.Context) (string, error) DbSize(ctx context.Context) (int64, error) Info(ctx context.Context) (map[string]string, error) }
IInfo redis info command
Click to show internal directories.
Click to hide internal directories.