aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/grpc/interceptor.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/grpc/interceptor.go')
-rw-r--r--vendor/google.golang.org/grpc/interceptor.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/google.golang.org/grpc/interceptor.go b/vendor/google.golang.org/grpc/interceptor.go
index 06dc825..1f6ef67 100644
--- a/vendor/google.golang.org/grpc/interceptor.go
+++ b/vendor/google.golang.org/grpc/interceptor.go
@@ -48,7 +48,9 @@ type UnaryServerInfo struct {
}
// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal
-// execution of a unary RPC.
+// execution of a unary RPC. If a UnaryHandler returns an error, it should be produced by the
+// status package, or else gRPC will use codes.Unknown as the status code and err.Error() as
+// the status message of the RPC.
type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error)
// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info