Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder implements a handler that logs the raw binary payloads of incoming requests and outgoing responses.
func NewRecorder ¶
func NewRecorder(reqStream, resStream io.Writer, h proxy.RequestHandler) *Recorder
NewRecorder creates a handler that intercepts incoming requests and outgoing responses of an existing RequestHandler and writes them to the specified stream.
func (*Recorder) HandleRequest ¶
HandleRequest implements RequestHandler.
func (*Recorder) RemoveClient ¶
RemoveClient is a no-op for the recorder.
type RemoteMongo ¶
type RemoteMongo struct {
// contains filtered or unexported fields
}
RemoteMongo acts as a pipe that relays requests/responses between a connected client and a remote mongo server.
func NewRemoteMongoHandler ¶
func NewRemoteMongoHandler(remoteAddr string, tlsConfig *tls.Config) (*RemoteMongo, error)
NewRemoteMongoHandler returns a request handler that connects to a mongod instance at remoteAddr and relays requests/responses. The handler will attempt to establish a TLS connection to the remote server if a non-nil tlsConfig argument is provided.
func (*RemoteMongo) HandleRequest ¶
HandleRequest implements RequestHandler.
func (*RemoteMongo) RemoveClient ¶
func (*RemoteMongo) RemoveClient(string) error
RemoveClient is a no-op.