constants

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseWaitTime         = time.Microsecond * 500
	DialTimeout          = time.Second * 2
	ConnRetryWait        = time.Millisecond * 10
	ReadTimeout          = time.Second * 1
	ShutdownTimeout      = time.Millisecond * 500
	ClientRequestTimeout = time.Second * 2

	DefaultNetwork = "tcp"
	DefaultHost    = "localhost"
	DefaultPort    = 6379

	MaxConnectionPool = 20
	MaxRequestBatch   = 200

	InvalidAddrErr = "address host:port are invalid"
	InvalidPortErr = "invalid configured port %d"
	EmptyParamErr  = "parameters cannot be empty on request"
	EmptyResErr    = "empty response back from %s request"
	EmptyResArgErr = "empty argument from %s request"

	ClientUninitializedErr  = "client was not initialized"
	ClientInitTimeoutErr    = "timed out dialing %s for %s"
	ClientRequestTimeoutErr = "request (%s) timed out after %s"

	UndefinedOpErr = "undefined operation: %s"
)
View Source
const (
	RequestSizeBytes = 30
	HeaderSize       = 4
)
View Source
const (
	PONG = "PONG"
	OK   = "OK"

	ERR = '-'

	PING = "ping"
	ECHO = "echo"
	GET  = "get"
	DEL  = "del"
	SET  = "set"
)

Variables

This section is empty.

Functions

func Ok

func Ok() []byte

func Pong

func Pong() []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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