Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Services = map[string]NewService{}
Services is a map of service name and its new function.
View Source
var StreamInterceptors = map[string]NewStreamInterceptor{}
StreamInterceptors is a map of registered streaming grpc interceptor
View Source
var UnaryInterceptors = map[string]NewUnaryInterceptor{}
UnaryInterceptors is a map of registered unary grpc interceptors.
Functions ¶
func Register ¶
func Register(name string, newFunc NewService)
Register registers a new gRPC service with name and new function.
func RegisterStreamInterceptor ¶
func RegisterStreamInterceptor(name string, newFunc NewStreamInterceptor)
RegisterStreamInterceptor registers a new stream interceptor.
func RegisterUnaryInterceptor ¶
func RegisterUnaryInterceptor(name string, newFunc NewUnaryInterceptor)
RegisterUnaryInterceptor registers a new unary interceptor.
Types ¶
type NewService ¶
NewService is the function that gRPC services need to register at init time.
type NewStreamInterceptor ¶
type NewStreamInterceptor func(m map[string]interface{}) (grpc.StreamServerInterceptor, int, error)
NewStreamInterceptor is the type that stream interceptors need to register.
type NewUnaryInterceptor ¶
type NewUnaryInterceptor func(m map[string]interface{}) (grpc.UnaryServerInterceptor, int, error)
NewUnaryInterceptor is the type that unary interceptors need to register.
Click to show internal directories.
Click to hide internal directories.