Documentation

Index

Constants

This section is empty.

Variables

var File_helper_forwarding_types_proto protoreflect.FileDescriptor

Functions

func GenerateForwardedHTTPRequest

func GenerateForwardedHTTPRequest(req *http.Request, addr string) (*http.Request, error)

GenerateForwardedRequest generates a new http.Request that contains the original requests's information in the new request's body.

func ParseForwardedHTTPRequest

func ParseForwardedHTTPRequest(req *http.Request) (*http.Request, error)

ParseForwardedRequest generates a new http.Request that is comprised of the values in the given request's body, assuming it correctly parses into a ForwardedRequest.

func ParseForwardedRequest

func ParseForwardedRequest(fq *Request) (*http.Request, error)

Types

type HeaderEntry

type HeaderEntry struct {
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*HeaderEntry) Descriptor

func (*HeaderEntry) Descriptor() ([]byte, []int)

Deprecated: Use HeaderEntry.ProtoReflect.Descriptor instead.

func (*HeaderEntry) GetValues

func (x *HeaderEntry) GetValues() []string

func (*HeaderEntry) ProtoMessage

func (*HeaderEntry) ProtoMessage()

func (*HeaderEntry) ProtoReflect

func (x *HeaderEntry) ProtoReflect() protoreflect.Message

func (*HeaderEntry) Reset

func (x *HeaderEntry) Reset()

func (*HeaderEntry) String

func (x *HeaderEntry) String() string

type RPCResponseWriter

type RPCResponseWriter struct {
	// contains filtered or unexported fields
}

func NewRPCResponseWriter

func NewRPCResponseWriter() *RPCResponseWriter

NewRPCResponseWriter returns an initialized RPCResponseWriter

func (*RPCResponseWriter) Body

func (w *RPCResponseWriter) Body() *bytes.Buffer

func (*RPCResponseWriter) Header

func (w *RPCResponseWriter) Header() http.Header

func (*RPCResponseWriter) StatusCode

func (w *RPCResponseWriter) StatusCode() int

func (*RPCResponseWriter) Write

func (w *RPCResponseWriter) Write(buf []byte) (int, error)

func (*RPCResponseWriter) WriteHeader

func (w *RPCResponseWriter) WriteHeader(code int)

type Request

type Request struct {
	Method           string                  `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Url              *URL                    `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	HeaderEntries    map[string]*HeaderEntry "" /* 188 byte string literal not displayed */
	Body             []byte                  `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	Host             string                  `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`
	RemoteAddr       string                  `protobuf:"bytes,7,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	PeerCertificates [][]byte                `protobuf:"bytes,8,rep,name=peer_certificates,json=peerCertificates,proto3" json:"peer_certificates,omitempty"`

}

func GenerateForwardedRequest

func GenerateForwardedRequest(req *http.Request) (*Request, error)

func (*Request) Descriptor

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetBody

func (x *Request) GetBody() []byte

func (*Request) GetHeaderEntries

func (x *Request) GetHeaderEntries() map[string]*HeaderEntry

func (*Request) GetHost

func (x *Request) GetHost() string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetPeerCertificates

func (x *Request) GetPeerCertificates() [][]byte

func (*Request) GetRemoteAddr

func (x *Request) GetRemoteAddr() string

func (*Request) GetUrl

func (x *Request) GetUrl() *URL

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	StatusCode uint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Body       []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`

	HeaderEntries map[string]*HeaderEntry "" /* 188 byte string literal not displayed */
	LastRemoteWal uint64                  `protobuf:"varint,5,opt,name=last_remote_wal,json=lastRemoteWal,proto3" json:"last_remote_wal,omitempty"`

}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetBody

func (x *Response) GetBody() []byte

func (*Response) GetHeaderEntries

func (x *Response) GetHeaderEntries() map[string]*HeaderEntry

func (*Response) GetLastRemoteWal

func (x *Response) GetLastRemoteWal() uint64

func (*Response) GetStatusCode

func (x *Response) GetStatusCode() uint32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type URL

type URL struct {
	Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
	Opaque string `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// This isn't needed now but might be in the future, so we'll skip the
	// number to keep the ordering in net/url
	//UserInfo user = 3;
	Host    string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
	Path    string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	RawPath string `protobuf:"bytes,6,opt,name=raw_path,json=rawPath,proto3" json:"raw_path,omitempty"`
	// This also isn't needed right now, but we'll reserve the number
	//bool force_query = 7;
	RawQuery string `protobuf:"bytes,8,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"`
	Fragment string `protobuf:"bytes,9,opt,name=fragment,proto3" json:"fragment,omitempty"`
	// contains filtered or unexported fields
}

func (*URL) Descriptor

func (*URL) Descriptor() ([]byte, []int)

Deprecated: Use URL.ProtoReflect.Descriptor instead.

func (*URL) GetFragment

func (x *URL) GetFragment() string

func (*URL) GetHost

func (x *URL) GetHost() string

func (*URL) GetOpaque

func (x *URL) GetOpaque() string

func (*URL) GetPath

func (x *URL) GetPath() string

func (*URL) GetRawPath

func (x *URL) GetRawPath() string

func (*URL) GetRawQuery

func (x *URL) GetRawQuery() string

func (*URL) GetScheme

func (x *URL) GetScheme() string

func (*URL) ProtoMessage

func (*URL) ProtoMessage()

func (*URL) ProtoReflect

func (x *URL) ProtoReflect() protoreflect.Message

func (*URL) Reset

func (x *URL) Reset()

func (*URL) String

func (x *URL) String() string