MCPcopy Index your code
hub / github.com/CodisLabs/codis / NewBackendConn

Function NewBackendConn

pkg/proxy/backend.go:44–57  ·  view source on GitHub ↗
(addr string, database int, config *Config)

Source from the content-addressed store, hash-verified

42}
43
44func NewBackendConn(addr string, database int, config *Config) *BackendConn {
45 bc := &BackendConn{
46 addr: addr, config: config, database: database,
47 }
48 bc.input = make(chan *Request, 1024)
49 bc.retry.delay = &DelayExp2{
50 Min: 50, Max: 5000,
51 Unit: time.Millisecond,
52 }
53
54 go bc.run()
55
56 return bc
57}
58
59func (bc *BackendConn) Addr() string {
60 return bc.addr

Callers 2

newConnPairFunction · 0.85
newSharedBackendConnFunction · 0.85

Calls 1

runMethod · 0.95

Tested by 1

newConnPairFunction · 0.68