MCPcopy Index your code
hub / github.com/DoNewsCode/core / Serve

Method Serve

c.go:374–379  ·  view source on GitHub ↗

Serve runs the serve command bundled in the core. For larger projects, consider use full-featured ServeModule instead of calling serve directly.

(ctx context.Context)

Source from the content-addressed store, hash-verified

372// Serve runs the serve command bundled in the core.
373// For larger projects, consider use full-featured ServeModule instead of calling serve directly.
374func (c *C) Serve(ctx context.Context) error {
375 return c.di.Invoke(func(in serveIn) error {
376 cmd := newServeCmd(in)
377 return cmd.ExecuteContext(ctx)
378 })
379}
380
381// Shutdown iterates through every CloserProvider registered in the container,
382// and calls them in the reversed order of registration.

Callers 15

httpServeMethod · 0.80
grpcServeMethod · 0.80
Example_minimalFunction · 0.80
ExampleC_stackFunction · 0.80
TestC_ServeFunction · 0.80
TestC_ServeDisableFunction · 0.80
ExampleFunction · 0.80
Test_deprecationFunction · 0.80

Calls 2

newServeCmdFunction · 0.85
InvokeMethod · 0.80

Tested by 13

Example_minimalFunction · 0.64
ExampleC_stackFunction · 0.64
TestC_ServeFunction · 0.64
TestC_ServeDisableFunction · 0.64
ExampleFunction · 0.64
Test_deprecationFunction · 0.64
Example_serverFunction · 0.64
Example_providersFunction · 0.64