Documentation ¶
Index ¶
- func ConvertMap2String(meta map[string]string) string
- func ConvertMeta2Map(meta string) map[string]string
- func CopyMeta(src, dst map[string]string)
- func ExternalIPV4() (string, error)
- func ExternalIPV6() (string, error)
- func GetFreePort() (port int, err error)
- func ParseRpcxAddress(addr string) (network string, ip string, port int, err error)
- func SliceByteToString(b []byte) string
- func StringToSliceByte(s string) []byte
- func Unzip(data []byte) ([]byte, error)
- func Zip(data []byte) ([]byte, error)
- type LimitedPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMap2String ¶
func ConvertMeta2Map ¶
func ExternalIPV4 ¶
ExternalIPV4 gets external IPv4 address of this server.
func ExternalIPV6 ¶
ExternalIPV6 gets external IPv6 address of this server.
func ParseRpcxAddress ¶
ParseRpcxAddress parses rpcx address such as tcp@127.0.0.1:8972 quic@192.168.1.1:9981
func SliceByteToString ¶
func StringToSliceByte ¶
Types ¶
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)
Click to show internal directories.
Click to hide internal directories.