grpc: export MethodHandler #7794 (#7796)

This commit is contained in:
Muhammed Jishin Jamal TCP 2024-11-11 13:35:04 +05:30 committed by GitHub
parent a3a8657078
commit 0d0e530848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -87,12 +87,13 @@ func init() {
var statusOK = status.New(codes.OK, "")
var logger = grpclog.Component("core")
type methodHandler func(srv any, ctx context.Context, dec func(any) error, interceptor UnaryServerInterceptor) (any, error)
// MethodHandler is a function type that processes a unary RPC method call.
type MethodHandler func(srv any, ctx context.Context, dec func(any) error, interceptor UnaryServerInterceptor) (any, error)
// MethodDesc represents an RPC service's method specification.
type MethodDesc struct {
MethodName string
Handler methodHandler
Handler MethodHandler
}
// ServiceDesc represents an RPC service's specification.