protocompat

package
v0.52.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestFullNameFromMethodDesc

func RequestFullNameFromMethodDesc(sd *grpc.ServiceDesc, method grpc.MethodDesc) (protoreflect.FullName, error)

RequestFullNameFromMethodDesc returns the fully-qualified name of the request message of the provided service's method.

func ResponseFullNameFromMethodDesc

func ResponseFullNameFromMethodDesc(sd *grpc.ServiceDesc, method grpc.MethodDesc) (protoreflect.FullName, error)

ResponseFullNameFromMethodDesc returns the fully-qualified name of the response message of the provided service's method.

Types

type Handler

type Handler = func(ctx context.Context, request, response protoiface.MessageV1) error

func MakeHybridHandler

func MakeHybridHandler(cdc codec.BinaryCodec, sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) (Handler, error)

MakeHybridHandler returns a handler that can handle both gogo and protov2 messages, no matter if the handler is a gogo or protov2 handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL