MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / startAPIServer

Method startAPIServer

server/server.go:100–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func (srv *Server) startAPIServer() {
101 srv.initHandlers()
102 httpServer := &http.Server{
103 Addr: srv.config.Addr,
104 Handler: srv.engine,
105 }
106 go func() {
107 if err := httpServer.ListenAndServe(); err != nil {
108 if errors.Is(err, http.ErrServerClosed) {
109 return
110 }
111 panic(fmt.Errorf("API server: %w", err))
112 }
113 }()
114 srv.httpServer = httpServer
115}
116
117func PProf(c *gin.Context) {
118 switch c.Param("profile") {

Callers 1

StartMethod · 0.95

Calls 2

initHandlersMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected