Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDirectorFunc ¶
NewDirectorFunc returns a director function capable of configuring a proxy request
func NewErrorHandler ¶
func NewErrorHandler() func(http.ResponseWriter, *http.Request, error)
NewErrorHandler returns a func(http.ResponseWriter, *http.Request, error) responsible for handling proxy errors
Types ¶
type Certs ¶
type Certs struct { RootCerts *x509.CertPool Certificate tls.Certificate }
Certs holds definition of certificates we use to perform mTLS handshake with a cluster
func NewClusterCerts ¶
NewClusterCerts creates a new cluster configuration from cert / key pair
type Cluster ¶
type Cluster struct { Address string // Address is a real IP address of a cluster ingress Port string // Port is a real port of HTTP TLS service Name string // Name is a cluster name, used in cluster certificates Certs *Certs }
Cluster represent a Knative cluster that we want to proxy requests to
type Function ¶
type Function struct { Name string // Name is a function name, it includes a "service name" component too Namespace string // Namespace is a kubernetes namespace this function has been deployed to BaseDomain string // BaseDomain is a cluster base domain, used to route requests to apropriate service }
Function represents a Knative service that is going to be invoked by the proxied request
type Serverless ¶
type Serverless struct {
// contains filtered or unexported fields
}
Serverless is a servering used to proxy requests between a client and Knative cluster.
func (*Serverless) ServeFileHTTP ¶
func (s *Serverless) ServeFileHTTP(h serving.Handler) bool
ServeFileHTTP handle an incoming request and proxies it to Knative cluster
func (*Serverless) ServeNotFoundHTTP ¶
func (s *Serverless) ServeNotFoundHTTP(h serving.Handler)
ServeNotFoundHTTP responds with 404
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a struct that handle the proxy connection round trip to Knative cluster
func NewTransport ¶
NewTransport fabricates as new transport type