Documentation ¶
Index ¶
- func DummyInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func ErrRepackagingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func UnaryInterceptorChainer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DummyInterceptor ¶
func DummyInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
DummyInterceptor is a dummy, showcasing interceptor chaining
func ErrRepackagingInterceptor ¶
func ErrRepackagingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
ErrRepackagingInterceptor logs and then repackages errors to be returned to the user
func UnaryInterceptorChainer ¶
func UnaryInterceptorChainer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
UnaryInterceptorChainer is shamelessly copied from go-grpc-middleware.ChainUnaryServer
Types ¶
type Server ¶
type Server struct { }
Server represents the gRPC server
func (*Server) C2F ¶
func (s *Server) C2F(ctx context.Context, req *api.ConversionMsg) (cm *api.ConversionMsg, err error)
C2F calculates temperature in F from C
func (*Server) F2C ¶
func (s *Server) F2C(ctx context.Context, req *api.ConversionMsg) (cm *api.ConversionMsg, err error)
F2C calculates temperature in C from F
Click to show internal directories.
Click to hide internal directories.