Documentation ¶
Index ¶
- Constants
- type Config
- func (p *Config) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (p *Config) RunNetworkServer(ctx context.Context, l net.Listener, encrypted bool) error
- func (p *Config) ShutDown() error
- func (p *Config) UpdateSecrets(cert *tls.Certificate, caPool *x509.CertPool, s secrets.Secrets, ...)
- type JWTClaims
- type TriremeHTTPErrHandler
- type TriremeRoundTripper
Constants ¶
const ( // TriremeBadGatewayText is the message to send when downstream fails. TriremeBadGatewayText = ":The downstream port cannot be accessed. Please validate your service ports and address/hosts configuration" // TriremeGatewayTimeout is the message to send when downstream times-out. TriremeGatewayTimeout = ":The downstream node timed-out." // StatusClientClosedRequest non-standard HTTP status code for client disconnection StatusClientClosedRequest = 499 // StatusClientClosedRequestText non-standard HTTP status for client disconnection StatusClientClosedRequestText = "Client Closed Request" )
const ( // TriremeOIDCCallbackURI is the callback URI that must be presented by // any OIDC provider. TriremeOIDCCallbackURI = "/aporeto/oidc/callback" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config maintains state for proxies connections from listen to backend.
func NewHTTPProxy ¶
func NewHTTPProxy( c collector.EventCollector, puContext string, caPool *x509.CertPool, applicationProxy bool, mark int, secrets secrets.Secrets, registry *serviceregistry.Registry, ) *Config
NewHTTPProxy creates a new instance of proxy reate a new instance of Proxy
func (*Config) GetCertificateFunc ¶
func (p *Config) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc implements the TLS interface for getting the certificate. This allows us to update the certificates of the connection on the fly.
func (*Config) RunNetworkServer ¶
RunNetworkServer runs an HTTP network server. If TLS is needed, the listener should be already a TLS listener.
func (*Config) UpdateSecrets ¶
func (p *Config) UpdateSecrets(cert *tls.Certificate, caPool *x509.CertPool, s secrets.Secrets, certPEM, keyPEM string)
UpdateSecrets updates the secrets
type JWTClaims ¶
type JWTClaims struct { jwt.StandardClaims SourceID string Scopes []string Profile []string }
JWTClaims is the structure of the claims we are sending on the wire.
type TriremeHTTPErrHandler ¶
type TriremeHTTPErrHandler struct{}
TriremeHTTPErrHandler Standard error handler
func (TriremeHTTPErrHandler) ServeHTTP ¶
func (e TriremeHTTPErrHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, err error)
type TriremeRoundTripper ¶
type TriremeRoundTripper struct {
http.RoundTripper
}
TriremeRoundTripper is the Trireme RoundTripper that will handle responses.
func NewTriremeRoundTripper ¶
func NewTriremeRoundTripper(r http.RoundTripper) *TriremeRoundTripper
NewTriremeRoundTripper creates a new RoundTripper that handles the responses.