MCPcopy Create free account
hub / github.com/distributedio/titan / Stop

Method Stop

metrics/server.go:39–49  ·  view source on GitHub ↗

Stop Close serve fd

()

Source from the content-addressed store, hash-verified

37
38//Stop Close serve fd
39func (s *Server) Stop() error {
40 zap.L().Info("status server stop", zap.String("addr", s.addr))
41 if s.statusServer != nil {
42 if err := s.statusServer.Close(); err != nil {
43 zap.L().Error("status server stop failed", zap.String("addr", s.addr), zap.Error(err))
44 return err
45 }
46 }
47 zap.L().Info("status server stop sucess", zap.String("addr", s.addr))
48 return nil
49}
50
51//GracefulStop serve graceful stop
52func (s *Server) GracefulStop() error {

Callers 1

TestListenAndServerFunction · 0.95

Calls 4

InfoMethod · 0.80
ErrorMethod · 0.65
StringMethod · 0.45
CloseMethod · 0.45

Tested by 1

TestListenAndServerFunction · 0.76