global

package
v0.0.0-...-3139442 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FreeMemoryInterval = 0
	LastMemoryFree     = int64(0)
	ConnBufSize        = 4 * 1024
	UdpMaxLength       = 2 * 1024
	TcpStreamTimeout   = 5 * time.Minute
	UdpStreamTimeout   = 2 * time.Minute
	TLSCertVerifier    func(serverName string, certs [][]byte) bool
)
View Source
var (
	Stdout = log.New(os.Stdout, "", log.LstdFlags)
	Stderr = log.New(os.Stderr, "", log.LstdFlags)
)

Functions

func DisableBufPool

func DisableBufPool()

func FreeOSMemory

func FreeOSMemory()

func NewBufPool

func NewBufPool(minSize, maxSize uint32) *defaultBufPool

func SetFreeMemoryInterval

func SetFreeMemoryInterval(interval int)

func SetGCPercent

func SetGCPercent(percent int)

func SetGOMAXPROCS

func SetGOMAXPROCS(value int)

func SetTcpStreamTimeout

func SetTcpStreamTimeout(seconds int)

func SetUdpStreamTimeout

func SetUdpStreamTimeout(seconds int)

func UseDefaultLogger

func UseDefaultLogger()

Types

type BufferPool

type BufferPool interface {
	Get(size int) []byte
	Put(b []byte)
}
var BufPool BufferPool

Jump to

Keyboard shortcuts

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