pool

package
v3.13.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RpcClient

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

func (RpcClient) Call

func (this RpcClient) Call(method string, args interface{}, reply interface{}) error

func (RpcClient) Close

func (this RpcClient) Close() (err error)

type SafeRpcConnPools

type SafeRpcConnPools struct {
	sync.RWMutex
	M           map[string]*pool.ConnPool
	PingMethod  string
	MaxConns    int
	MaxIdle     int
	ConnTimeout int
	CallTimeout int
}

func CreateSafeRpcConnPools

func CreateSafeRpcConnPools(pingMethod string, maxConns, maxIdle, connTimeout, callTimeout int) *SafeRpcConnPools

func (*SafeRpcConnPools) Call

func (this *SafeRpcConnPools) Call(addr, method string, args interface{}, resp interface{}) error

同步发送, 完成发送或超时后 才能返回

func (*SafeRpcConnPools) Delete

func (this *SafeRpcConnPools) Delete(addr string)

func (*SafeRpcConnPools) Destroy

func (this *SafeRpcConnPools) Destroy()

func (*SafeRpcConnPools) Exists

func (this *SafeRpcConnPools) Exists(address string) bool

func (*SafeRpcConnPools) Get

func (this *SafeRpcConnPools) Get(address string) (*pool.ConnPool, bool)

func (*SafeRpcConnPools) Init

func (this *SafeRpcConnPools) Init(cluster []string)

func (*SafeRpcConnPools) Keys

func (this *SafeRpcConnPools) Keys() []string

func (*SafeRpcConnPools) Put

func (this *SafeRpcConnPools) Put(address string, p *pool.ConnPool)

Jump to

Keyboard shortcuts

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