MCPcopy
hub / github.com/grafana/dskit / handleGRPCError

Function handleGRPCError

server/server.go:697–706  ·  view source on GitHub ↗

handleGRPCError consolidates GRPC Server error handling by sending any error to errChan except for grpc.ErrServerStopped which is ignored.

(err error, errChan chan error)

Source from the content-addressed store, hash-verified

695// handleGRPCError consolidates GRPC Server error handling by sending
696// any error to errChan except for grpc.ErrServerStopped which is ignored.
697func handleGRPCError(err error, errChan chan error) {
698 if err == grpc.ErrServerStopped {
699 err = nil
700 }
701
702 select {
703 case errChan <- err:
704 default:
705 }
706}
707
708// HTTPListenAddr exposes `net.Addr` that `Server` is listening to for HTTP connections.
709func (s *Server) HTTPListenAddr() net.Addr {

Callers 1

RunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected