Documentation ¶
Overview ¶
Package grpc contains gRPC functionality for Martian proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsStreamProcessorFactory ¶
func AsStreamProcessorFactory(f ProcessorFactory) h2.StreamProcessorFactory
AsStreamProcessorFactory converts a ProcessorFactory into a StreamProcessorFactory. It creates an adapter that abstracts HTTP/2 frames into a representation that is closer to gRPC.
Types ¶
type Encoding ¶
type Encoding uint8
Encoding is the grpc-encoding type. See Content-Coding entry at: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
type Processor ¶
type Processor interface { h2.HeaderProcessor // Message receives serialized messages. Message(data []byte, streamEnded bool) error }
Processor processes gRPC traffic.
type ProcessorFactory ¶
ProcessorFactory creates gRPC processors that implement the Processor interface, which abstracts away some of the details of the underlying HTTP/2 protocol. A processor must forward invocations to the given `server` or `client` processors, which will arrange to have the data forwarded to the destination, with possible edits. Nil values are safe to return and no processing occurs in such cases. NOTE: an interface may have a non-nil type with a nil value. Such values are treated as valid processors.