MCPcopy
hub / github.com/dgraph-io/dgraph / Get

Method Get

conn/pool.go:70–81  ·  view source on GitHub ↗

Get returns the list for the given address.

(addr string)

Source from the content-addressed store, hash-verified

68
69// Get returns the list for the given address.
70func (p *Pools) Get(addr string) (*Pool, error) {
71 p.RLock()
72 defer p.RUnlock()
73 pool, ok := p.all[addr]
74 if !ok {
75 return nil, ErrNoConnection
76 }
77 if !pool.IsHealthy() {
78 return nil, ErrUnhealthyConnection
79 }
80 return pool, nil
81}
82
83// GetAll returns all pool entries.
84func (p *Pools) GetAll() []*Pool {

Callers

nothing calls this directly

Calls 3

RLockMethod · 0.80
RUnlockMethod · 0.80
IsHealthyMethod · 0.80

Tested by

no test coverage detected