rpcx: github.com/smallnest/rpcx/util Index | Files

package util

import "github.com/smallnest/rpcx/util"

Index

Package Files

buffer_pool.go compress.go converter.go net.go

func ConvertMap2String Uses

func ConvertMap2String(meta map[string]string) string

func ConvertMeta2Map Uses

func ConvertMeta2Map(meta string) map[string]string

func CopyMeta Uses

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

func GetFreePort Uses

func GetFreePort() (port int, err error)

GetFreePort gets a free port.

func ParseRpcxAddress Uses

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

ParseRpcxAddress parses rpcx address such as tcp@127.0.0.1:8972 quic@192.168.1.1:9981

func SliceByteToString Uses

func SliceByteToString(b []byte) string

func StringToSliceByte Uses

func StringToSliceByte(s string) []byte

func Unzip Uses

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

Unzip unzips data.

func Zip Uses

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

Zip zips data.

type LimitedPool Uses

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

func NewLimitedPool Uses

func NewLimitedPool(minSize, maxSize int) *LimitedPool

func (*LimitedPool) Get Uses

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

func (*LimitedPool) Put Uses

func (p *LimitedPool) Put(b *[]byte)

Package util imports 12 packages (graph) and is imported by 5 packages. Updated 2020-05-17. Refresh now. Tools for package owners.