Documentation
¶
Index ¶
- Constants
- Variables
- func NewRedisTracingHook(debug bool) *tracingHook
- func NewSpanContext(ctx context.Context, s trace.Span) context.Context
- func SpanFromContext(ctx context.Context) (s trace.Span, ok bool)
- type Client
- type ClusterClient
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetAddrs() []string
- func (x *Conf) GetDb() int32
- func (x *Conf) GetDebug() bool
- func (x *Conf) GetDialTimeout() *durationpb.Duration
- func (x *Conf) GetExpireTimeout() *durationpb.Duration
- func (x *Conf) GetPassword() string
- func (x *Conf) GetPoolSize() int32
- func (x *Conf) GetReadTimeout() *durationpb.Duration
- func (x *Conf) GetTls() *Tls
- func (x *Conf) GetUsername() string
- func (x *Conf) GetWriteTimeout() *durationpb.Duration
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- func (m *Conf) ValidateAll() error
- type ConfMultiError
- type ConfValidationError
- type Logger
- type Pipeliner
- type RedisTextMapCarrier
- type Script
- type StringStringMapCmd
- type Tls
- type TlsMultiError
- type TlsValidationError
- type XAddArgs
- type XReadGroupArgs
- type Z
- type ZAddArgs
- type ZRangeBy
Constants ¶
const KeepTTL = redis.KeepTTL
Variables ¶
var File_store_redis_conf_proto protoreflect.FileDescriptor
Functions ¶
func NewRedisTracingHook ¶
func NewRedisTracingHook(debug bool) *tracingHook
Types ¶
type ClusterClient ¶
type ClusterClient struct {
redis.ClusterClient
}
func NewCluster ¶
func NewCluster(c *Conf) *ClusterClient
type Conf ¶
type Conf struct {
// string network = 1;
Addrs []string `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"`
ReadTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
WriteTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
DialTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"`
ExpireTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=expire_timeout,json=expireTimeout,proto3" json:"expire_timeout,omitempty"`
Username string `protobuf:"bytes,7,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,8,opt,name=password,proto3" json:"password,omitempty"`
Db int32 `protobuf:"varint,9,opt,name=db,proto3" json:"db,omitempty"`
Tls *Tls `protobuf:"bytes,10,opt,name=tls,proto3" json:"tls,omitempty"`
Debug bool `protobuf:"varint,11,opt,name=debug,proto3" json:"debug,omitempty"`
PoolSize int32 `protobuf:"varint,12,opt,name=poolSize,proto3" json:"poolSize,omitempty"`
// contains filtered or unexported fields
}
func (*Conf) Descriptor
deprecated
func (*Conf) GetDialTimeout ¶
func (x *Conf) GetDialTimeout() *durationpb.Duration
func (*Conf) GetExpireTimeout ¶
func (x *Conf) GetExpireTimeout() *durationpb.Duration
func (*Conf) GetPassword ¶
func (*Conf) GetPoolSize ¶
func (*Conf) GetReadTimeout ¶
func (x *Conf) GetReadTimeout() *durationpb.Duration
func (*Conf) GetUsername ¶
func (*Conf) GetWriteTimeout ¶
func (x *Conf) GetWriteTimeout() *durationpb.Duration
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
func (*Conf) Validate ¶
Validate checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Conf) ValidateAll ¶
ValidateAll checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfMultiError, or nil if none found.
type ConfMultiError ¶
type ConfMultiError []error
ConfMultiError is an error wrapping multiple validation errors returned by Conf.ValidateAll() if the designated constraints aren't met.
func (ConfMultiError) AllErrors ¶
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶
func (m ConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
type RedisTextMapCarrier ¶
type RedisTextMapCarrier struct {
}
func (*RedisTextMapCarrier) Get ¶
func (carrier *RedisTextMapCarrier) Get(key string) string
Get returns the value associated with the passed key.
func (*RedisTextMapCarrier) Keys ¶
func (carrier *RedisTextMapCarrier) Keys() []string
Keys lists the keys stored in this carrier.
func (*RedisTextMapCarrier) Set ¶
func (carrier *RedisTextMapCarrier) Set(key string, value string)
Set stores the key-value pair.
type StringStringMapCmd ¶
type StringStringMapCmd = redis.StringStringMapCmd
type Tls ¶
type Tls struct {
InsecureSkipVerify bool `protobuf:"varint,1,opt,name=insecureSkipVerify,proto3" json:"insecureSkipVerify,omitempty"`
// contains filtered or unexported fields
}
func (*Tls) Descriptor
deprecated
func (*Tls) GetInsecureSkipVerify ¶
func (*Tls) ProtoMessage ¶
func (*Tls) ProtoMessage()
func (*Tls) ProtoReflect ¶
func (x *Tls) ProtoReflect() protoreflect.Message
func (*Tls) Validate ¶
Validate checks the field values on Tls with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Tls) ValidateAll ¶
ValidateAll checks the field values on Tls with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TlsMultiError, or nil if none found.
type TlsMultiError ¶
type TlsMultiError []error
TlsMultiError is an error wrapping multiple validation errors returned by Tls.ValidateAll() if the designated constraints aren't met.
func (TlsMultiError) AllErrors ¶
func (m TlsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TlsMultiError) Error ¶
func (m TlsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TlsValidationError ¶
type TlsValidationError struct {
// contains filtered or unexported fields
}
TlsValidationError is the validation error returned by Tls.Validate if the designated constraints aren't met.
func (TlsValidationError) Cause ¶
func (e TlsValidationError) Cause() error
Cause function returns cause value.
func (TlsValidationError) Error ¶
func (e TlsValidationError) Error() string
Error satisfies the builtin error interface
func (TlsValidationError) ErrorName ¶
func (e TlsValidationError) ErrorName() string
ErrorName returns error name.
func (TlsValidationError) Field ¶
func (e TlsValidationError) Field() string
Field function returns field value.
func (TlsValidationError) Key ¶
func (e TlsValidationError) Key() bool
Key function returns key value.
func (TlsValidationError) Reason ¶
func (e TlsValidationError) Reason() string
Reason function returns reason value.
type XReadGroupArgs ¶
type XReadGroupArgs = redis.XReadGroupArgs