Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoConnection indicates no connection exists to a node. ErrNoConnection = errors.New("No connection exists") // ErrUnhealthyConnection indicates the connection to a node is unhealthy. ErrUnhealthyConnection = errors.New("Unhealthy connection") //EchoDuration = 500 * time.Millisecond EchoDuration = 2 * time.Second )
Functions ¶
This section is empty.
Types ¶
type Pool ¶
Pool is used to manage the grpc client connection(s) for communicating with other worker instances. Right now it just holds one of them.
func (*Pool) Get ¶
func (p *Pool) Get() *grpc.ClientConn
Get returns the connection to use from the pool of connections.
func (*Pool) MonitorHealth ¶
func (p *Pool) MonitorHealth()
MonitorHealth monitors the health of the connection via Echo. This function blocks forever.
Click to show internal directories.
Click to hide internal directories.