Documentation ¶
Index ¶
- Constants
- Variables
- type Conn
- func (c *Conn) Block()
- func (c *Conn) Client() transport.Client
- func (c *Conn) CloseConn()
- func (c *Conn) Cursor() int
- func (c *Conn) GetState() state
- func (c *Conn) GrowError()
- func (c *Conn) GrowErrorCount() uint32
- func (c *Conn) IsBlock() bool
- func (c *Conn) IsWorking() bool
- func (c *Conn) Ready()
- func (c *Conn) SetCursor(i int)
- func (c *Conn) Working()
Constants ¶
View Source
const ( // StateBlock block is unavailable state StateBlock state = 0x01 + iota // StateReady ready is unavailable state StateReady // StateWorking is available state StateWorking )
Variables ¶
View Source
var ( // DefaultConnectTimeout dial rpc connection timeout // connect server within connectTimeout // if out of ranges,will be timeout DefaultConnectTimeout = time.Second * 5 // DefaultKeepaliveInterval rpc keepalive interval time //keepalive setting,the period for requesting heartbeat to stay connected DefaultKeepaliveInterval = time.Second * 5 // DefaultKeepaliveLifetime rpc keepalive lifetime //keepalive setting,the longest time the connection can survive DefaultKeepaliveLifetime = time.Second * 600 )
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn include transport client
func (*Conn) CloseConn ¶ added in v1.1.6
func (c *Conn) CloseConn()
CloseConn close client connection
func (*Conn) GrowError ¶
func (c *Conn) GrowError()
GrowError grow error and let the error conn retry working util conn is out of serviceName
func (*Conn) GrowErrorCount ¶
GrowErrorCount error safe grow one
Click to show internal directories.
Click to hide internal directories.