MCPcopy Create free account
hub / github.com/cppla/moto / ensurePrewarmPool

Function ensurePrewarmPool

controller/prewarm.go:46–56  ·  view source on GitHub ↗
(addr string, desired int)

Source from the content-addressed store, hash-verified

44 wg sync.WaitGroup
45
46 mu sync.Mutex
47 idle []idlePrewarmConn
48 rules map[string]*config.Rule
49 warming int
50 failures int
51 nextRetry time.Time
52 stopped bool
53}
54
55// initPrewarm 会为规则中的每个目标开启后台保温。
56func initPrewarm(rule *config.Rule) {
57 defaultRoutingRuntime.prewarm.init(rule)
58}
59

Callers 1

initPrewarmFunction · 0.85

Calls 1

ensureLockedMethod · 0.80

Tested by

no test coverage detected