Documentation ¶
Index ¶
- Constants
- Variables
- func BetweenValues[T constraints.Ordered](t testing.TB, d, start, end T, msgAndArgs ...interface{})
- func BetweenValuesEx[T constraints.Ordered](t testing.TB, d, start, end T, msgAndArgs ...interface{})
- func CLIPath() string
- func DefaultTLSConfig() (*tls.Config, error)
- func ErrorRegexp(t testing.TB, err error, rx interface{}, msgAndArgs ...interface{})
- func FindInfoEntry(rdb *redis.Client, key string, section ...string) string
- func Populate(t testing.TB, rdb *redis.Client, prefix string, n, size int)
- func RandPath[T any](f ...func() T) T
- func RandPathNoResult(f ...func())
- func RandString(min, max int, typ RandStringType) string
- func RandStringWithSeed(min, max int, typ RandStringType, seed int64) string
- func RandomBool() bool
- func RandomInt(max int64) int64
- func RandomIntWithSeed(max, seed int64) int64
- func RandomSignedInt(max int32) int64
- func RandomValue() string
- func RandomValueWithSeed(seed int64) string
- func RetryEventually(t testing.TB, condition func() bool, maxAttempts int, ...)
- func ReverseSlice[T any](s []T)
- func SlaveOf(t testing.TB, slave *redis.Client, master *KvrocksServer)
- func TLSEnable() bool
- func WaitForOffsetSync(t testing.TB, master, slave *redis.Client, waitFor time.Duration)
- func WaitForSync(t testing.TB, slave *redis.Client)
- type ConfigOptions
- type FieldType
- type KvrocksServer
- func (s *KvrocksServer) Close()
- func (s *KvrocksServer) CloseWithoutCleanup()
- func (s *KvrocksServer) Host() string
- func (s *KvrocksServer) HostPort() string
- func (s *KvrocksServer) LogFileMatches(t testing.TB, pattern string) bool
- func (s *KvrocksServer) NewClient() *redis.Client
- func (s *KvrocksServer) NewClientWithOption(options *redis.Options) *redis.Client
- func (s *KvrocksServer) NewTCPClient() *TCPClient
- func (s *KvrocksServer) NewTCPTLSClient(conf *tls.Config) *TCPClient
- func (s *KvrocksServer) Port() uint64
- func (s *KvrocksServer) Restart()
- func (s *KvrocksServer) Start()
- func (s *KvrocksServer) TLSAddr() string
- func (s *KvrocksServer) TLSPort() uint64
- type KvrocksServerConfigs
- type RandStringType
- type TCPClient
- func (c *TCPClient) Close() error
- func (c *TCPClient) MustFail(t testing.TB)
- func (c *TCPClient) MustMatch(t testing.TB, rx string)
- func (c *TCPClient) MustRead(t testing.TB, s string)
- func (c *TCPClient) MustReadStrings(t testing.TB, s []string)
- func (c *TCPClient) MustReadStringsWithKey(t testing.TB, key string, s []string)
- func (c *TCPClient) ReadLine() (string, error)
- func (c *TCPClient) TLSState() *tls.ConnectionState
- func (c *TCPClient) Write(s string) error
- func (c *TCPClient) WriteArgs(args ...string) error
Constants ¶
View Source
const DefaultDelta = 0.000001
Variables ¶
View Source
var SlotTable = [...]string{}/* 16384 elements not displayed */
SlotTable is a table of the shortest possible alphanumeric string that is mapped by redis's crc16 to any given redis cluster slot.
The array indexes are slot numbers, so that given a desired slot, this string is guaranteed to make redis cluster route a request to the shard holding this slot
Functions ¶
func BetweenValues ¶
func BetweenValues[T constraints.Ordered](t testing.TB, d, start, end T, msgAndArgs ...interface{})
BetweenValues asserts start <= d <= end
func BetweenValuesEx ¶
func BetweenValuesEx[T constraints.Ordered](t testing.TB, d, start, end T, msgAndArgs ...interface{})
BetweenValuesEx asserts start < d < end
func DefaultTLSConfig ¶
func ErrorRegexp ¶
func FindInfoEntry ¶
func RandPathNoResult ¶
func RandPathNoResult(f ...func())
func RandString ¶
func RandString(min, max int, typ RandStringType) string
func RandStringWithSeed ¶
func RandStringWithSeed(min, max int, typ RandStringType, seed int64) string
func RandomBool ¶
func RandomBool() bool
func RandomIntWithSeed ¶
func RandomSignedInt ¶
RandomSignedInt returns an integer in (-max, max)
func RandomValue ¶
func RandomValue() string
func RandomValueWithSeed ¶
func RetryEventually ¶
func ReverseSlice ¶
func ReverseSlice[T any](s []T)
func SlaveOf ¶
func SlaveOf(t testing.TB, slave *redis.Client, master *KvrocksServer)
func WaitForOffsetSync ¶
func WaitForSync ¶
Types ¶
type ConfigOptions ¶
type KvrocksServer ¶
type KvrocksServer struct {
// contains filtered or unexported fields
}
func StartServer ¶
func StartServer(t testing.TB, configs map[string]string) *KvrocksServer
func StartTLSServer ¶
func StartTLSServer(t testing.TB, configs map[string]string) *KvrocksServer
func (*KvrocksServer) Close ¶
func (s *KvrocksServer) Close()
func (*KvrocksServer) CloseWithoutCleanup ¶
func (s *KvrocksServer) CloseWithoutCleanup()
func (*KvrocksServer) Host ¶
func (s *KvrocksServer) Host() string
func (*KvrocksServer) HostPort ¶
func (s *KvrocksServer) HostPort() string
func (*KvrocksServer) LogFileMatches ¶
func (s *KvrocksServer) LogFileMatches(t testing.TB, pattern string) bool
func (*KvrocksServer) NewClient ¶
func (s *KvrocksServer) NewClient() *redis.Client
func (*KvrocksServer) NewClientWithOption ¶
func (s *KvrocksServer) NewClientWithOption(options *redis.Options) *redis.Client
func (*KvrocksServer) NewTCPClient ¶
func (s *KvrocksServer) NewTCPClient() *TCPClient
func (*KvrocksServer) NewTCPTLSClient ¶
func (s *KvrocksServer) NewTCPTLSClient(conf *tls.Config) *TCPClient
func (*KvrocksServer) Port ¶
func (s *KvrocksServer) Port() uint64
func (*KvrocksServer) Restart ¶
func (s *KvrocksServer) Restart()
func (*KvrocksServer) Start ¶
func (s *KvrocksServer) Start()
func (*KvrocksServer) TLSAddr ¶
func (s *KvrocksServer) TLSAddr() string
func (*KvrocksServer) TLSPort ¶
func (s *KvrocksServer) TLSPort() uint64
type KvrocksServerConfigs ¶
func GenerateConfigsMatrix ¶
func GenerateConfigsMatrix(configOptions []ConfigOptions) ([]KvrocksServerConfigs, error)
/ GenerateConfigsMatrix generates all possible combinations of config options
type TCPClient ¶
type TCPClient struct {
// contains filtered or unexported fields
}
func (*TCPClient) MustReadStringsWithKey ¶
func (*TCPClient) TLSState ¶
func (c *TCPClient) TLSState() *tls.ConnectionState
Click to show internal directories.
Click to hide internal directories.