Documentation
¶
Overview ¶
Note: inspiration for this from https://gist.github.com/cespare/3985516
Index ¶
- func NewHttpPipe(rw http.ResponseWriter, backend backendProxy, hostKey string) (*BackendHttpReader, *BackendHttpWriter, error)
- func ParsePublicKey(keyFile string) (interface{}, error)
- func ParsePublicKeyFromMemory(keyFileContents string) (interface{}, error)
- type BackendHandler
- type BackendHttpReader
- type BackendHttpWriter
- type Certs
- type Config
- type FrontendHTTPHandler
- type FrontendHandler
- type ProxyStarter
- type ServiceProxyRequest
- type ServiceProxyResponse
- type StatsHandler
- type SwarmHandler
- type TokenLookup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHttpPipe ¶ added in v0.16.3
func NewHttpPipe(rw http.ResponseWriter, backend backendProxy, hostKey string) (*BackendHttpReader, *BackendHttpWriter, error)
func ParsePublicKey ¶
Types ¶
type BackendHandler ¶
type BackendHandler struct {
// contains filtered or unexported fields
}
func (*BackendHandler) ServeHTTP ¶
func (h *BackendHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type BackendHttpReader ¶ added in v0.16.3
type BackendHttpReader struct {
// contains filtered or unexported fields
}
func NewBackendHttpReader ¶ added in v0.16.3
func NewBackendHttpReader(rw http.ResponseWriter, hostKey, msgKey string, backend backendProxy, messages <-chan common.Message) *BackendHttpReader
func (*BackendHttpReader) Close ¶ added in v0.16.3
func (b *BackendHttpReader) Close() error
type BackendHttpWriter ¶ added in v0.16.3
type BackendHttpWriter struct {
// contains filtered or unexported fields
}
func (*BackendHttpWriter) Close ¶ added in v0.16.3
func (b *BackendHttpWriter) Close() error
func (*BackendHttpWriter) Write ¶ added in v0.16.3
func (b *BackendHttpWriter) Write(buffer []byte) (int, error)
func (*BackendHttpWriter) WriteRequest ¶ added in v0.16.3
type Config ¶
type FrontendHTTPHandler ¶ added in v0.14.0
type FrontendHTTPHandler struct {
FrontendHandler
HttpsPorts map[int]bool
TokenLookup *TokenLookup
}
func (*FrontendHTTPHandler) ServeHTTP ¶ added in v0.14.0
func (h *FrontendHTTPHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type FrontendHandler ¶
type FrontendHandler struct {
// contains filtered or unexported fields
}
func (*FrontendHandler) ServeHTTP ¶
func (h *FrontendHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type ProxyStarter ¶
type ProxyStarter struct {
BackendPaths []string
FrontendPaths []string
FrontendHTTPPaths []string
StatsPaths []string
CattleProxyPaths []string
CattleWSProxyPaths []string
Config *Config
}
func (*ProxyStarter) StartProxy ¶
func (s *ProxyStarter) StartProxy() error
type ServiceProxyRequest ¶ added in v0.14.0
type ServiceProxyResponse ¶ added in v0.14.0
type ServiceProxyResponse struct {
Token string `json:"token"`
}
type StatsHandler ¶ added in v0.5.0
type StatsHandler struct {
// contains filtered or unexported fields
}
func (*StatsHandler) ServeHTTP ¶ added in v0.5.0
func (h *StatsHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type SwarmHandler ¶ added in v0.16.0
type SwarmHandler struct {
FrontendHandler *FrontendHTTPHandler
DefaultHandler http.Handler
}
func (*SwarmHandler) ServeHTTP ¶ added in v0.16.0
func (s *SwarmHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type TokenLookup ¶ added in v0.14.0
type TokenLookup struct {
// contains filtered or unexported fields
}
func NewTokenLookup ¶ added in v0.14.0
func NewTokenLookup(cattleAddr string) *TokenLookup
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
This code is adapted from: https://github.com/armon/go-proxyproto
|
This code is adapted from: https://github.com/armon/go-proxyproto |
Click to show internal directories.
Click to hide internal directories.