MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewRouter

Function NewRouter

IceFireDB-PubSub/pkg/router/redisNode/router.go:38–48  ·  view source on GitHub ↗
(cli *redis.Pool)

Source from the content-addressed store, hash-verified

36)
37
38func NewRouter(cli *redis.Pool) *Router {
39 r := &Router{
40 client: cli,
41 cmd: make(map[string]router.HandlersChain),
42 }
43 r.pool.New = func() interface{} {
44 return r.allocateContext()
45 }
46 r.ctx, r.cancel = context.WithCancel(context.Background())
47 return r
48}
49
50const CMDEXEC = "CMDEXEC"
51

Callers

nothing calls this directly

Calls 1

allocateContextMethod · 0.95

Tested by

no test coverage detected