help

package
v0.0.0-...-ddedba6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContainerGracePeriod = 30 * time.Second

	EnvSrvBinPath  = "srvBinPath"
	EnvDataDir     = "dataDir"
	EnvKeepDataDir = "keepDataDir"
	EnvSrvPort     = "srvPort"

	EnvConfTestCase = "confTestCase"
)

Variables

This section is empty.

Functions

func GetConfigTestCase

func GetConfigTestCase(name string) (data map[string]string)

func RandPath

func RandPath[T any](f ...func() T) T

func RandPathNoResult

func RandPathNoResult(f ...func())

func RandString

func RandString(min, max int, typ RandStringType) string

func RandomBool

func RandomBool() bool

func RandomInt

func RandomInt(max int64) int64

RandomInt return an integer in [0, max)

func RandomSignedInt

func RandomSignedInt(max int32) int64

RandomSignedInt returns an integer in (-max, max)

func RandomValue

func RandomValue() string

Types

type RandStringType

type RandStringType int
const (
	Alpha RandStringType = iota
	Binary
)

type TCPClient

type TCPClient struct {
	// contains filtered or unexported fields
}

func (*TCPClient) Close

func (c *TCPClient) Close() error

func (*TCPClient) MustFail

func (c *TCPClient) MustFail()

func (*TCPClient) MustMatch

func (c *TCPClient) MustMatch(rx string)

func (*TCPClient) MustRead

func (c *TCPClient) MustRead(s string)

func (*TCPClient) MustReadStrings

func (c *TCPClient) MustReadStrings(s []string)

func (*TCPClient) ReadLine

func (c *TCPClient) ReadLine() (string, error)

func (*TCPClient) TLSState

func (c *TCPClient) TLSState() *tls.ConnectionState

func (*TCPClient) Write

func (c *TCPClient) Write(s string) error

func (*TCPClient) WriteArgs

func (c *TCPClient) WriteArgs(args ...string) error

type WedisSrv

type WedisSrv struct {
	// contains filtered or unexported fields
}

func StartSrv

func StartSrv(srvConfigs map[string]string) *WedisSrv

func (*WedisSrv) Close

func (s *WedisSrv) Close()

func (*WedisSrv) InitConfigs

func (s *WedisSrv) InitConfigs(srvConfigs map[string]string) (f *os.File)

func (*WedisSrv) NewRedisClient

func (s *WedisSrv) NewRedisClient() redis.UniversalClient

func (*WedisSrv) NewTCPClient

func (s *WedisSrv) NewTCPClient() *TCPClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL