MCPcopy
hub / github.com/CodisLabs/codis / NewRouter

Function NewRouter

pkg/proxy/router.go:32–41  ·  view source on GitHub ↗
(config *Config)

Source from the content-addressed store, hash-verified

30}
31
32func NewRouter(config *Config) *Router {
33 s := &Router{config: config}
34 s.pool.primary = newSharedBackendConnPool(config, config.BackendPrimaryParallel)
35 s.pool.replica = newSharedBackendConnPool(config, config.BackendReplicaParallel)
36 for i := range s.slots {
37 s.slots[i].id = i
38 s.slots[i].method = &forwardSync{}
39 }
40 return s
41}
42
43func (s *Router) Start() {
44 s.mu.Lock()

Callers 1

NewFunction · 0.85

Calls 1

newSharedBackendConnPoolFunction · 0.85

Tested by

no test coverage detected