MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Get

Method Get

mcp-server/server.go:79–95  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

77}
78
79func (s *Server) Get(id string) (*Handler, bool) {
80 s.locker.RLock()
81 defer s.locker.RUnlock()
82 ser, has := s.servers[id]
83 if !has {
84 return nil, false
85 }
86 m := &Handler{
87 MCPServer: ser.MCPServer,
88 handlers: make(map[string]http.Handler),
89 }
90 for k, v := range ser.handlers {
91 m.handlers[k] = v
92 }
93
94 return m, true
95}
96
97func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
98 var sid string

Callers 1

ServeHTTPMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected