Documentation
¶
Index ¶
- Variables
- func New(ctx context.Context, config *Config) *lazyloadx.Group[redis.UniversalClient]
- type Config
- type Options
- func (*Options) Descriptor() ([]byte, []int)deprecated
- func (x *Options) GetAddrs() []string
- func (x *Options) GetClientName() *wrapperspb.StringValue
- func (x *Options) GetClusterOptions() *Options_ClusterOptions
- func (x *Options) GetConnMaxIdleTime() *durationpb.Duration
- func (x *Options) GetConnMaxLifetime() *durationpb.Duration
- func (x *Options) GetContextTimeoutEnabled() *wrapperspb.BoolValue
- func (x *Options) GetDb() *wrapperspb.Int32Value
- func (x *Options) GetDialTimeout() *durationpb.Duration
- func (x *Options) GetDisableIdentity() *wrapperspb.BoolValue
- func (x *Options) GetEnableMetrics() *wrapperspb.BoolValue
- func (x *Options) GetEnableTracing() *wrapperspb.BoolValue
- func (x *Options) GetFailoverOptions() *Options_FailOverOptions
- func (x *Options) GetIdentitySuffix() *wrapperspb.StringValue
- func (x *Options) GetMaxActiveConns() *wrapperspb.Int32Value
- func (x *Options) GetMaxIdleConns() *wrapperspb.Int32Value
- func (x *Options) GetMaxRetries() *wrapperspb.Int32Value
- func (x *Options) GetMaxRetryBackoff() *durationpb.Duration
- func (x *Options) GetMinIdleConns() *wrapperspb.Int32Value
- func (x *Options) GetMinRetryBackoff() *durationpb.Duration
- func (x *Options) GetPassword() *wrapperspb.StringValue
- func (x *Options) GetPoolFifo() *wrapperspb.BoolValue
- func (x *Options) GetPoolSize() *wrapperspb.Int32Value
- func (x *Options) GetPoolTimeout() *durationpb.Duration
- func (x *Options) GetProtocol() *wrapperspb.Int32Value
- func (x *Options) GetReadTimeout() *durationpb.Duration
- func (x *Options) GetSentinelPassword() *wrapperspb.StringValue
- func (x *Options) GetSentinelUsername() *wrapperspb.StringValue
- func (x *Options) GetTlsConfig() *Options_TLSOptions
- func (x *Options) GetUsername() *wrapperspb.StringValue
- func (x *Options) GetWriteTimeout() *durationpb.Duration
- func (*Options) ProtoMessage()
- func (x *Options) ProtoReflect() protoreflect.Message
- func (x *Options) Reset()
- func (x *Options) String() string
- type Options_ClusterOptions
- func (*Options_ClusterOptions) Descriptor() ([]byte, []int)deprecated
- func (x *Options_ClusterOptions) GetMaxRedirects() *wrapperspb.Int32Value
- func (x *Options_ClusterOptions) GetReadOnly() *wrapperspb.BoolValue
- func (x *Options_ClusterOptions) GetRouteByLatency() *wrapperspb.BoolValue
- func (x *Options_ClusterOptions) GetRouteRandomly() *wrapperspb.BoolValue
- func (*Options_ClusterOptions) ProtoMessage()
- func (x *Options_ClusterOptions) ProtoReflect() protoreflect.Message
- func (x *Options_ClusterOptions) Reset()
- func (x *Options_ClusterOptions) String() string
- type Options_FailOverOptions
- func (*Options_FailOverOptions) Descriptor() ([]byte, []int)deprecated
- func (x *Options_FailOverOptions) GetMasterName() *wrapperspb.StringValue
- func (*Options_FailOverOptions) ProtoMessage()
- func (x *Options_FailOverOptions) ProtoReflect() protoreflect.Message
- func (x *Options_FailOverOptions) Reset()
- func (x *Options_FailOverOptions) String() string
- type Options_TLSOptions
- func (*Options_TLSOptions) Descriptor() ([]byte, []int)deprecated
- func (x *Options_TLSOptions) GetCertFile() string
- func (x *Options_TLSOptions) GetKeyFile() string
- func (*Options_TLSOptions) ProtoMessage()
- func (x *Options_TLSOptions) ProtoReflect() protoreflect.Message
- func (x *Options_TLSOptions) Reset()
- func (x *Options_TLSOptions) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pkg_redisx_config_proto protoreflect.FileDescriptor
View Source
var Provider = wire.NewSet(
NewRedisClients,
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Configs map[string]*Options `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
added in
v0.0.2
func (*Config) GetConfigs ¶ added in v0.0.2
func (*Config) ProtoMessage ¶ added in v0.0.2
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶ added in v0.0.2
func (x *Config) ProtoReflect() protoreflect.Message
type Options ¶ added in v0.0.2
type Options struct { // Either a single address or a seed list of host:port addresses // of cluster/sentinel nodes. Addrs []string `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs,omitempty"` // client_name will execute the `CLIENT SETNAME ClientName` command for each conn. ClientName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"` // db to be selected after connecting to the server. // Only single-node and failover clients. Db *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=db,proto3" json:"db,omitempty"` Protocol *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` Username *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` Password *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` SentinelUsername *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=sentinel_username,json=sentinelUsername,proto3" json:"sentinel_username,omitempty"` SentinelPassword *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=sentinel_password,json=sentinelPassword,proto3" json:"sentinel_password,omitempty"` MaxRetries *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` MinRetryBackoff *durationpb.Duration `protobuf:"bytes,10,opt,name=min_retry_backoff,json=minRetryBackoff,proto3" json:"min_retry_backoff,omitempty"` MaxRetryBackoff *durationpb.Duration `protobuf:"bytes,11,opt,name=max_retry_backoff,json=maxRetryBackoff,proto3" json:"max_retry_backoff,omitempty"` DialTimeout *durationpb.Duration `protobuf:"bytes,12,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"` ReadTimeout *durationpb.Duration `protobuf:"bytes,13,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"` WriteTimeout *durationpb.Duration `protobuf:"bytes,14,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"` ContextTimeoutEnabled *wrapperspb.BoolValue `` /* 127-byte string literal not displayed */ // PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). PoolFifo *wrapperspb.BoolValue `protobuf:"bytes,16,opt,name=pool_fifo,json=poolFifo,proto3" json:"pool_fifo,omitempty"` PoolSize *wrapperspb.Int32Value `protobuf:"bytes,17,opt,name=pool_size,json=poolSize,proto3" json:"pool_size,omitempty"` PoolTimeout *durationpb.Duration `protobuf:"bytes,18,opt,name=pool_timeout,json=poolTimeout,proto3" json:"pool_timeout,omitempty"` MinIdleConns *wrapperspb.Int32Value `protobuf:"bytes,19,opt,name=min_idle_conns,json=minIdleConns,proto3" json:"min_idle_conns,omitempty"` MaxIdleConns *wrapperspb.Int32Value `protobuf:"bytes,20,opt,name=max_idle_conns,json=maxIdleConns,proto3" json:"max_idle_conns,omitempty"` MaxActiveConns *wrapperspb.Int32Value `protobuf:"bytes,21,opt,name=max_active_conns,json=maxActiveConns,proto3" json:"max_active_conns,omitempty"` ConnMaxIdleTime *durationpb.Duration `protobuf:"bytes,22,opt,name=conn_max_idle_time,json=connMaxIdleTime,proto3" json:"conn_max_idle_time,omitempty"` ConnMaxLifetime *durationpb.Duration `protobuf:"bytes,23,opt,name=conn_max_lifetime,json=connMaxLifetime,proto3" json:"conn_max_lifetime,omitempty"` TlsConfig *Options_TLSOptions `protobuf:"bytes,24,opt,name=tls_config,json=tlsConfig,proto3" json:"tls_config,omitempty"` // Only cluster clients. ClusterOptions *Options_ClusterOptions `protobuf:"bytes,25,opt,name=cluster_options,json=clusterOptions,proto3" json:"cluster_options,omitempty"` // Only failover clients. FailoverOptions *Options_FailOverOptions `protobuf:"bytes,26,opt,name=failover_options,json=failoverOptions,proto3" json:"failover_options,omitempty"` DisableIdentity *wrapperspb.BoolValue `protobuf:"bytes,27,opt,name=disable_identity,json=disableIdentity,proto3" json:"disable_identity,omitempty"` IdentitySuffix *wrapperspb.StringValue `protobuf:"bytes,28,opt,name=identity_suffix,json=identitySuffix,proto3" json:"identity_suffix,omitempty"` EnableTracing *wrapperspb.BoolValue `protobuf:"bytes,29,opt,name=enable_tracing,json=enableTracing,proto3" json:"enable_tracing,omitempty"` EnableMetrics *wrapperspb.BoolValue `protobuf:"bytes,30,opt,name=enable_metrics,json=enableMetrics,proto3" json:"enable_metrics,omitempty"` // contains filtered or unexported fields }
func (*Options) Descriptor
deprecated
added in
v0.0.2
func (*Options) GetClientName ¶ added in v0.0.2
func (x *Options) GetClientName() *wrapperspb.StringValue
func (*Options) GetClusterOptions ¶ added in v0.0.2
func (x *Options) GetClusterOptions() *Options_ClusterOptions
func (*Options) GetConnMaxIdleTime ¶ added in v0.0.2
func (x *Options) GetConnMaxIdleTime() *durationpb.Duration
func (*Options) GetConnMaxLifetime ¶ added in v0.0.2
func (x *Options) GetConnMaxLifetime() *durationpb.Duration
func (*Options) GetContextTimeoutEnabled ¶ added in v0.0.2
func (x *Options) GetContextTimeoutEnabled() *wrapperspb.BoolValue
func (*Options) GetDb ¶ added in v0.0.2
func (x *Options) GetDb() *wrapperspb.Int32Value
func (*Options) GetDialTimeout ¶ added in v0.0.2
func (x *Options) GetDialTimeout() *durationpb.Duration
func (*Options) GetDisableIdentity ¶ added in v0.0.2
func (x *Options) GetDisableIdentity() *wrapperspb.BoolValue
func (*Options) GetEnableMetrics ¶ added in v0.0.2
func (x *Options) GetEnableMetrics() *wrapperspb.BoolValue
func (*Options) GetEnableTracing ¶ added in v0.0.2
func (x *Options) GetEnableTracing() *wrapperspb.BoolValue
func (*Options) GetFailoverOptions ¶ added in v0.0.2
func (x *Options) GetFailoverOptions() *Options_FailOverOptions
func (*Options) GetIdentitySuffix ¶ added in v0.0.2
func (x *Options) GetIdentitySuffix() *wrapperspb.StringValue
func (*Options) GetMaxActiveConns ¶ added in v0.0.2
func (x *Options) GetMaxActiveConns() *wrapperspb.Int32Value
func (*Options) GetMaxIdleConns ¶ added in v0.0.2
func (x *Options) GetMaxIdleConns() *wrapperspb.Int32Value
func (*Options) GetMaxRetries ¶ added in v0.0.2
func (x *Options) GetMaxRetries() *wrapperspb.Int32Value
func (*Options) GetMaxRetryBackoff ¶ added in v0.0.2
func (x *Options) GetMaxRetryBackoff() *durationpb.Duration
func (*Options) GetMinIdleConns ¶ added in v0.0.2
func (x *Options) GetMinIdleConns() *wrapperspb.Int32Value
func (*Options) GetMinRetryBackoff ¶ added in v0.0.2
func (x *Options) GetMinRetryBackoff() *durationpb.Duration
func (*Options) GetPassword ¶ added in v0.0.2
func (x *Options) GetPassword() *wrapperspb.StringValue
func (*Options) GetPoolFifo ¶ added in v0.0.2
func (x *Options) GetPoolFifo() *wrapperspb.BoolValue
func (*Options) GetPoolSize ¶ added in v0.0.2
func (x *Options) GetPoolSize() *wrapperspb.Int32Value
func (*Options) GetPoolTimeout ¶ added in v0.0.2
func (x *Options) GetPoolTimeout() *durationpb.Duration
func (*Options) GetProtocol ¶ added in v0.0.2
func (x *Options) GetProtocol() *wrapperspb.Int32Value
func (*Options) GetReadTimeout ¶ added in v0.0.2
func (x *Options) GetReadTimeout() *durationpb.Duration
func (*Options) GetSentinelPassword ¶ added in v0.0.2
func (x *Options) GetSentinelPassword() *wrapperspb.StringValue
func (*Options) GetSentinelUsername ¶ added in v0.0.2
func (x *Options) GetSentinelUsername() *wrapperspb.StringValue
func (*Options) GetTlsConfig ¶ added in v0.0.2
func (x *Options) GetTlsConfig() *Options_TLSOptions
func (*Options) GetUsername ¶ added in v0.0.2
func (x *Options) GetUsername() *wrapperspb.StringValue
func (*Options) GetWriteTimeout ¶ added in v0.0.2
func (x *Options) GetWriteTimeout() *durationpb.Duration
func (*Options) ProtoMessage ¶ added in v0.0.2
func (*Options) ProtoMessage()
func (*Options) ProtoReflect ¶ added in v0.0.2
func (x *Options) ProtoReflect() protoreflect.Message
type Options_ClusterOptions ¶ added in v0.0.2
type Options_ClusterOptions struct { MaxRedirects *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=max_redirects,json=maxRedirects,proto3" json:"max_redirects,omitempty"` ReadOnly *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` RouteByLatency *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=route_by_latency,json=routeByLatency,proto3" json:"route_by_latency,omitempty"` RouteRandomly *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=route_randomly,json=routeRandomly,proto3" json:"route_randomly,omitempty"` // contains filtered or unexported fields }
func (*Options_ClusterOptions) Descriptor
deprecated
added in
v0.0.2
func (*Options_ClusterOptions) Descriptor() ([]byte, []int)
Deprecated: Use Options_ClusterOptions.ProtoReflect.Descriptor instead.
func (*Options_ClusterOptions) GetMaxRedirects ¶ added in v0.0.2
func (x *Options_ClusterOptions) GetMaxRedirects() *wrapperspb.Int32Value
func (*Options_ClusterOptions) GetReadOnly ¶ added in v0.0.2
func (x *Options_ClusterOptions) GetReadOnly() *wrapperspb.BoolValue
func (*Options_ClusterOptions) GetRouteByLatency ¶ added in v0.0.2
func (x *Options_ClusterOptions) GetRouteByLatency() *wrapperspb.BoolValue
func (*Options_ClusterOptions) GetRouteRandomly ¶ added in v0.0.2
func (x *Options_ClusterOptions) GetRouteRandomly() *wrapperspb.BoolValue
func (*Options_ClusterOptions) ProtoMessage ¶ added in v0.0.2
func (*Options_ClusterOptions) ProtoMessage()
func (*Options_ClusterOptions) ProtoReflect ¶ added in v0.0.2
func (x *Options_ClusterOptions) ProtoReflect() protoreflect.Message
func (*Options_ClusterOptions) Reset ¶ added in v0.0.2
func (x *Options_ClusterOptions) Reset()
func (*Options_ClusterOptions) String ¶ added in v0.0.2
func (x *Options_ClusterOptions) String() string
type Options_FailOverOptions ¶ added in v0.0.2
type Options_FailOverOptions struct { // The sentinel master name. MasterName *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=master_name,json=masterName,proto3" json:"master_name,omitempty"` // contains filtered or unexported fields }
func (*Options_FailOverOptions) Descriptor
deprecated
added in
v0.0.2
func (*Options_FailOverOptions) Descriptor() ([]byte, []int)
Deprecated: Use Options_FailOverOptions.ProtoReflect.Descriptor instead.
func (*Options_FailOverOptions) GetMasterName ¶ added in v0.0.2
func (x *Options_FailOverOptions) GetMasterName() *wrapperspb.StringValue
func (*Options_FailOverOptions) ProtoMessage ¶ added in v0.0.2
func (*Options_FailOverOptions) ProtoMessage()
func (*Options_FailOverOptions) ProtoReflect ¶ added in v0.0.2
func (x *Options_FailOverOptions) ProtoReflect() protoreflect.Message
func (*Options_FailOverOptions) Reset ¶ added in v0.0.2
func (x *Options_FailOverOptions) Reset()
func (*Options_FailOverOptions) String ¶ added in v0.0.2
func (x *Options_FailOverOptions) String() string
type Options_TLSOptions ¶ added in v0.0.2
type Options_TLSOptions struct { CertFile string `protobuf:"bytes,1,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"` KeyFile string `protobuf:"bytes,2,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"` // contains filtered or unexported fields }
func (*Options_TLSOptions) Descriptor
deprecated
added in
v0.0.2
func (*Options_TLSOptions) Descriptor() ([]byte, []int)
Deprecated: Use Options_TLSOptions.ProtoReflect.Descriptor instead.
func (*Options_TLSOptions) GetCertFile ¶ added in v0.0.2
func (x *Options_TLSOptions) GetCertFile() string
func (*Options_TLSOptions) GetKeyFile ¶ added in v0.0.2
func (x *Options_TLSOptions) GetKeyFile() string
func (*Options_TLSOptions) ProtoMessage ¶ added in v0.0.2
func (*Options_TLSOptions) ProtoMessage()
func (*Options_TLSOptions) ProtoReflect ¶ added in v0.0.2
func (x *Options_TLSOptions) ProtoReflect() protoreflect.Message
func (*Options_TLSOptions) Reset ¶ added in v0.0.2
func (x *Options_TLSOptions) Reset()
func (*Options_TLSOptions) String ¶ added in v0.0.2
func (x *Options_TLSOptions) String() string
Click to show internal directories.
Click to hide internal directories.