MCPcopy
hub / github.com/labstack/echo / NewConcurrentRouter

Function NewConcurrentRouter

router_concurrent.go:9–14  ·  view source on GitHub ↗

NewConcurrentRouter creates concurrency safe Router which routes can be added/removed safely even after http.Server has been started.

(r Router)

Source from the content-addressed store, hash-verified

7// NewConcurrentRouter creates concurrency safe Router which routes can be added/removed safely
8// even after http.Server has been started.
9func NewConcurrentRouter(r Router) Router {
10 return &concurrentRouter{
11 mu: sync.RWMutex{},
12 router: r,
13 }
14}
15
16type concurrentRouter struct {
17 mu sync.RWMutex

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…