Versions in this module Expand all Collapse all v0 v0.3.1 Jun 21, 2021 Changes in this version + const HeaderAcceptEncoding + const HeaderContentType + const HeaderHRPCErr + const MIMEApplicationJSON + const MIMEApplicationJSONCharsetUTF8 + const MIMEApplicationProtobuf + const ModName + var ErrGRPCInvokeLen = grpc.Errorf(codes.Internal, "invoke request without len 2 res") + var ErrGRPCResponseValid = grpc.Errorf(codes.Internal, "response valid") + var ErrNotFound = HTTPError + func GRPCProxyWrapper(h interface{}) echo.HandlerFunc + func ProtoError(c echo.Context, code int, e error) error + func ProtoJSON(c echo.Context, code int, i interface{}) error + type Config struct + Debug bool + Deployment string + DisableMetric bool + DisableTrace bool + Host string + Port int + ServiceAddress string + SlowQueryThresholdInMilli int64 + func DefaultConfig() *Config + func RawConfig(key string) *Config + func StdConfig(name string) *Config + func (config *Config) Address() string + func (config *Config) Build() *Server + func (config *Config) WithHost(host string) *Config + func (config *Config) WithLogger(logger *xlog.Logger) *Config + func (config *Config) WithPort(port int) *Config + type EmptyMessage struct + func (*EmptyMessage) ProtoMessage() + func (m *EmptyMessage) Reset() + func (m *EmptyMessage) String() string + type GRPCProxyMessage struct + Data proto.Message + Error int + Message string + func (*GRPCProxyMessage) ProtoMessage() + func (m *GRPCProxyMessage) MarshalJSONPB(jsb *jsonpb.Marshaler) ([]byte, error) + func (m *GRPCProxyMessage) Reset() + func (m *GRPCProxyMessage) String() string + type HTTPError struct + Code int + Message string + func NewHTTPError(code int, msg ...string) *HTTPError + func (e HTTPError) Error() string + type Server struct + func (s *Server) GracefulStop(ctx context.Context) error + func (s *Server) Info() *server.ServiceInfo + func (s *Server) Serve() error + func (s *Server) Stop() error