MCPcopy Create free account
hub / github.com/brimdata/super / Start

Method Start

pkg/httpd/server.go:37–49  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

35}
36
37func (s *Server) Start(ctx context.Context) error {
38 s.done.Add(1)
39 s.srv.BaseContext = func(l net.Listener) context.Context { return ctx }
40 ln, err := net.Listen("tcp", s.addr)
41 if err != nil {
42 s.logger.Error("Listen error", zap.Error(err))
43 return err
44 }
45 s.lnAddr = ln.Addr().String()
46 s.logger.Info("Listening", zap.String("addr", s.lnAddr))
47 go s.serve(ctx, ln)
48 return nil
49}
50
51func (s *Server) Run(ctx context.Context) error {
52 if err := s.Start(ctx); err != nil {

Callers 9

RunMethod · 0.95
TestDeadlineExceededFunction · 0.45
startColorMethod · 0.45
InitWithSignalsMethod · 0.45
RunMethod · 0.45
mainFunction · 0.45
formatBranchMetaFunction · 0.45
formatCommitMethod · 0.45

Calls 5

serveMethod · 0.95
AddrMethod · 0.80
StringMethod · 0.65
AddMethod · 0.45
ErrorMethod · 0.45

Tested by 2

TestDeadlineExceededFunction · 0.36