Back to

package util

v0.0.0 (ed08247)
Latest Go to latest
Published: 5 days ago | License: Apache-2.0 | Module:


func ConvertMap2String

func ConvertMap2String(meta map[string]string) string

func ConvertMeta2Map

func ConvertMeta2Map(meta string) map[string]string

func CopyMeta

func CopyMeta(src, dst map[string]string)

func GetFreePort

func GetFreePort() (port int, err error)

GetFreePort gets a free port.

func ParseRpcxAddress

func ParseRpcxAddress(addr string) (network string, ip string, port int, err error)

ParseRpcxAddress parses rpcx address such as tcp@ quic@

func SliceByteToString

func SliceByteToString(b []byte) string

func StringToSliceByte

func StringToSliceByte(s string) []byte

func Unzip

func Unzip(data []byte) ([]byte, error)

Unzip unzips data.

func Zip

func Zip(data []byte) ([]byte, error)

Zip zips data.

type LimitedPool

type LimitedPool struct {
	// contains filtered or unexported fields

func NewLimitedPool

func NewLimitedPool(minSize, maxSize int) *LimitedPool

func (*LimitedPool) Get

func (p *LimitedPool) Get(size int) *[]byte

func (*LimitedPool) Put

func (p *LimitedPool) Put(b *[]byte)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier