package
0.9.4
Repository: https://github.com/nextdoor/redispipe.git
Documentation: pkg.go.dev

# Packages

Package redisclusterutil implements some protocol level details of cluster specification.

# Functions

DebugEvent is stub implementation of test-related method.
DefaultRoundRobinSeed returns singleton of TimedRoundRobinSeed with random interval between 45ms and 100ms.
NewCluster creates Cluster.
NewTimedRoundRobinSeed returns TimedRoundRobinSeed which updates its value every `interval`.

# Constants

ConnHostPreferFirst means "always prefer first connection among established to redis instance".
ConnHostRoundRobin means "spread requests among connections established to redis instance".
ForceMasterAndSlaves - override "writeness" of command and allow to send it to replica.
ForcePreferSlaves - overrides "writeness" of command.
MasterAndSlaves means request could be executed on slave, and every host in replica set has same probability for query execution.
MasterOnly means request should be executed on master.
PreferSlaves means request could be executed on slave, but replica has 3 times more probability to handle request.

# Variables

EKCluster - cluster for error.
EKClusterName - cluster name.
EKPolicy - policy used to choose between master and replicas.
ErrAddressNotResolved - address could not be resolved Cluster resolves named hosts specified as start points.
ErrCluster - some cluster related errors.
ErrClusterConfigEmpty - no addresses found in config.
ErrClusterSlots - fetching slots configuration failed.
ErrNoAliveConnection - no alive connection to shard.

# Structs

Cluster is implementation of redis.Sender which represents connection to redis-cluster.
ClusterHandle is used to wrap cluster's handle and set it as connection's handle.
DefaultLogger is a default Logger implementation.
FairRoundRobinSeed implements RoundRobinSeed by returning new value every time using atomic increment.
LogClusterSlotsError is logged when CLUSTER SLOTS failed.
LogContextClosed is logged when cluster's context is closed.
LogHostEvent is a wrapper for per-connection event.
LogSlotRangeError is logged when no host were able to respond to CLUSTER SLOTS.
NoopLogger implements Logger with no logging at all.
Opts is a options for Cluster.
PolicyMan wraps Cluster and change default policy for Send and SendMany methods.
Scanner is an implementation of redis.Scanner.
TimedRoundRobinSeed is implementation of RoundRobinSeed.

# Interfaces

LogEvent is a sumtype for events to be logged.
Logger is used for loggin cluster-related events and requests statistic.
RoundRobinSeed is the source of decision which replica to use for each particular request when replica-policy is MasterAndSlaves or PreferSlaves.

# Type aliases

ConnHostPolicyEnum is config enumeration of policies of connections-per-host usage.
Future is an alias for redis.Future.
ReplicaPolicyEnum is config enumeration of policies of replica-set hosts usage.
Request is an alias for redis.Request.