MCPcopy
hub / github.com/baetyl/baetyl / initRouter

Method initRouter

core/core.go:97–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95}
96
97func (c *Core) initRouter() fasthttp.RequestHandler {
98 router := routing.New()
99 router.Get("/node/stats", utils.Wrapper(c.nod.GetStats))
100 router.Get("/services/<service>/log", c.eng.GetServiceLog)
101 router.Get("/node/properties", utils.Wrapper(c.nod.GetNodeProperties))
102 router.Put("/node/properties", utils.Wrapper(c.nod.UpdateNodeProperties))
103 return router.HandleRequest
104}
105
106func StartCoreService() {
107 context.Run(func(ctx context.Context) error {

Callers 1

NewCoreFunction · 0.95

Calls 2

WrapperFunction · 0.92
GetMethod · 0.65

Tested by

no test coverage detected