Documentation ¶
Index ¶
- func New(service string, cluster Cluster) serving.Serving
- func NewDirectorFunc(service string) func(*http.Request)
- func NewErrorHandler() func(http.ResponseWriter, *http.Request, error)
- func NewFromAPISource(config api.Serverless) (serving.Serving, error)
- type Certs
- type Cluster
- type Serverless
- type Transport
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
func NewFromAPISource ¶ added in v1.17.0
func NewFromAPISource(config api.Serverless) (serving.Serving, error)
NewFromAPISource returns a serverless serving instance built from GitLab API response
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 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