Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "proxy"
Name is the name registered for the proto compressor.
Variables ¶
This section is empty.
Functions ¶
func GetServerOptions ¶
func GetServerOptions(director StreamDirector) []grpc.ServerOption
func TransparentHandler ¶
func TransparentHandler(director StreamDirector) grpc.StreamHandler
TransparentHandler returns a handler that attempts to proxy all requests that are not registered in the server. The indented use here is as a transparent proxy, where the server doesn't know about the services implemented by the backends. It should be used as a `grpc.UnknownServiceHandler`.
Types ¶
type MessageCodec ¶
type ProxyCodec ¶
type ProxyCodec struct{}
ProxyCodec is a Codec implementation with protobuf. It is the default ProxyCodec for gRPC.
func (ProxyCodec) Marshal ¶
func (ProxyCodec) Marshal(v interface{}) ([]byte, error)
func (ProxyCodec) Name ¶
func (ProxyCodec) Name() string
func (ProxyCodec) String ¶
func (ProxyCodec) String() string
func (ProxyCodec) Unmarshal ¶
func (ProxyCodec) Unmarshal(data []byte, v interface{}) error
type StreamDirector ¶
Click to show internal directories.
Click to hide internal directories.