Documentation ¶
Overview ¶
Package grpc provides a grpc server
Index ¶
- func AuthTLS(t *tls.Config) server.Option
- func Code(err error) codes.Code
- func Codec(contentType string, c grpc.Codec) server.Option
- func ErrorDesc(err error) string
- func Errorf(c codes.Code, format string, a ...interface{}) error
- func NewServer(opts ...server.Option) server.Server
- func TransportConfig(sc *grpcTransport.ServerConfig) server.Option
- type Debug
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the error code for err if it was produced by the rpc system. Otherwise, it returns codes.Unknown.
func Codec ¶ added in v0.6.0
gRPC Codec to be used to encode/decode requests for a given content type
func ErrorDesc ¶
ErrorDesc returns the error description of err if it was produced by the rpc system. Otherwise, it returns err.Error() or empty string when err is nil.
func Errorf ¶
Errorf returns an error containing an error code and a description; Errorf returns nil if c is OK.
func TransportConfig ¶ added in v0.9.0
func TransportConfig(sc *grpcTransport.ServerConfig) server.Option
TransportConfig should be used to setup a gRPC transport (http2 server) config
Types ¶
type Debug ¶
type Debug struct {
debug.DebugHandler
}
We use this to wrap any debug handlers so we preserve the signature Debug.{Method}
Click to show internal directories.
Click to hide internal directories.