Documentation ¶
Overview ¶
Package proxy provide a standard grpc proxy for use with Ondatra.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer interface { // DialGRPC creates a client connection to the specified service endpoint // on the target. The service will be represented as a gRPC service name. // Implementations must append transport security options necessary to reach // the server. DialGRPC(context.Context, string, ...grpc.DialOption) (*grpc.ClientConn, error) // Resolve will return the resolved devices/ates and related services for the // resolved topology. Resolve() (*rpb.Reservation, error) // HTTPClient provides an HTTP Client that can connect to the provided target. HTTPClient(string) (HTTPDoCloser, error) }
Dialer adds lower level binding interface for proxied connections to the base ondatra.Binding interface. Binding implementors are only expected to implement a proxy Dialer if they want to use the proxy as an extension to ondatra.Binding interface.
type HTTPCloserClient ¶
HTTPCloserClient provides noop wrapped http.Client.
func (*HTTPCloserClient) Close ¶
func (c *HTTPCloserClient) Close() error
Close is a noop close method.
type HTTPDoCloser ¶
HTTPDoCloser provides the required interface for clients to the proxy.
func WrapHTTPDoCloser ¶
func WrapHTTPDoCloser(c *http.Client) HTTPDoCloser
WrapHTTPDoCloser wraps a standard http.Client with a noop closer.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy will create a set of proxy listeners based on the provided testbed. The proxy implementation relies on the underlying proxy interface for allowing custom dial functions.
func New ¶
func New(d Dialer, sOpts ...grpc.ServerOption) (*Proxy, error)
New will create a new set of proxies for the provided Dialer.
Directories ¶
Path | Synopsis |
---|---|
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections.
|
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections. |
Package httpovergrpc implements a http/https service over grpc transport.
|
Package httpovergrpc implements a http/https service over grpc transport. |
proto
|
|