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

package util

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


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 ExternalIPV4 Uses

func ExternalIPV4() (string, error)

ExternalIPV4 gets external IPv4 address of this server.

func ExternalIPV6 Uses

func ExternalIPV6() (string, error)

ExternalIPV6 gets external IPv6 address of this server.

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@ quic@

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 13 packages (graph) and is imported by 7 packages. Updated 2020-12-22. Refresh now. Tools for package owners.