Documentation ¶
Index ¶
- func Errorf(code int, tmpl string, args ...interface{}) error
- func GetGRPCErrorFromHTTPResponse(resp *ghttpproto.HandleSimpleHTTPResponse) error
- func GetHTTPHeader(hs http.Header) []*ghttpproto.Element
- func GetHTTPResponseFromError(err error) (*ghttpproto.HandleSimpleHTTPResponse, bool)
- func MergeHTTPHeader(hs []*ghttpproto.Element, header http.Header)
- type ServerCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGRPCErrorFromHTTPResponse ¶
func GetGRPCErrorFromHTTPResponse(resp *ghttpproto.HandleSimpleHTTPResponse) error
GetGRPCErrorFromHTTPRespone takes an HandleSimpleHTTPResponse as input and returns a gRPC error.
func GetHTTPHeader ¶
func GetHTTPHeader(hs http.Header) []*ghttpproto.Element
GetHTTPHeader takes an http.Header as input and returns a slice of Header.
func GetHTTPResponseFromError ¶
func GetHTTPResponseFromError(err error) (*ghttpproto.HandleSimpleHTTPResponse, bool)
GetHTTPResponseFromError takes an gRPC error as input and returns a gRPC HandleSimpleHTTPResponse.
func MergeHTTPHeader ¶
func MergeHTTPHeader(hs []*ghttpproto.Element, header http.Header)
MergeHTTPHeader takes a slice of Header and merges with http.Header map.
Types ¶
type ServerCloser ¶
type ServerCloser struct {
// contains filtered or unexported fields
}
func (*ServerCloser) Add ¶
func (s *ServerCloser) Add(server *grpc.Server)
func (*ServerCloser) GracefulStop ¶
func (s *ServerCloser) GracefulStop()
func (*ServerCloser) Stop ¶
func (s *ServerCloser) Stop()
Click to show internal directories.
Click to hide internal directories.