func (r *Recorder) Close() error {
	return r.proxy.Close()
}
Close closes the Recorder and saves the log file.

Since Close writes a file, you should always check that
it returns a non-nil error.
package httpreplay
import (
	"net/http"
	"net/url"
	"github.com/google/go-replayers/httpreplay/internal/proxy"
)
type Recorder struct {
	proxy   *proxy.Proxy
	port    int
	initial []byte
	cert    string
	key     string
}
type recorderOption func(*Recorder)
func NewRecorder(filename string, initial []byte) (*Recorder, error) {
	p, err := proxy.ForRecording(filename, 0, "", "")
	if err != nil {
		return nil, err
	}
	p.Initial = initial
	return &Recorder{proxy: p}, nil
}
func RecorderCert(fileName string) recorderOption {
	return func(r *Recorder) {
		r.cert = fileName
	}
}
func RecorderKey(fileName string) recorderOption {
	return func(r *Recorder) {
		r.key = fileName
	}
}
func RecorderInitial(initial []byte) recorderOption {
	return func(r *Recorder) {
		r.initial = initial
	}
}
func RecorderPort(port int) recorderOption {
	return func(r *Recorder) {
		r.port = port
	}
}
func NewRecorderWithOpts(filename string, opts ...recorderOption) (*Recorder, error) {
	r := &Recorder{port: 0, initial: nil, cert: "", key: ""}
	for _, opt := range opts {
		opt(r)
	}
	p, err := proxy.ForRecording(filename, r.port, r.cert, r.key)
	if err != nil {
		return nil, err
	}
	p.Initial = r.initial
	r.proxy = p
	return r, nil
}
func (r *Recorder) ScrubBody(regexps ...string) {
	r.proxy.ScrubBody(regexps)
}
func (r *Recorder) RemoveRequestHeaders(patterns ...string) {
	r.proxy.RemoveRequestHeaders(patterns)
}
func (r *Recorder) ClearHeaders(patterns ...string) {
	r.proxy.ClearHeaders(patterns)
}
func (r *Recorder) RemoveQueryParams(patterns ...string) {
	r.proxy.RemoveQueryParams(patterns)
}
func (r *Recorder) ClearQueryParams(patterns ...string) {
	r.proxy.ClearQueryParams(patterns)
}
func (r *Recorder) Client() *http.Client {
	return &http.Client{Transport: r.proxy.Transport()}
}
func (r *Recorder) ProxyURL() *url.URL {
	return r.proxy.URL
}