Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKongClientForWorkspace ¶
func GetKongClientForWorkspace(ctx context.Context, adminURL string, wsName string, httpclient *http.Client) (*kong.Client, error)
GetKongClientForWorkspace returns a Kong API client for a given root API URL and workspace. If the workspace does not already exist, GetKongClientForWorkspace will create it.
func MakeHTTPClient ¶
func MakeHTTPClient(opts *HTTPClientOpts) (*http.Client, error)
MakeHTTPClient returns an HTTP client with the specified mTLS/headers configuration. BUG: This function overwrites the default transport and client in package http! This problem is being left as-is during refactoring to avoid regression of untested code. https://github.com/Kong/kubernetes-ingress-controller/issues/1233
Types ¶
type HTTPClientOpts ¶
type HTTPClientOpts struct {
// Disable verification of TLS certificate of Kong's Admin endpoint.
TLSSkipVerify bool
// SNI name to use to verify the certificate presented by Kong in TLS.
TLSServerName string
// Path to PEM-encoded CA certificate file to verify Kong's Admin SSL certificate.
CACertPath string
// PEM-encoded CA certificate to verify Kong's Admin SSL certificate.
CACert string
// Array of headers added to every Admin API call.
Headers []string
// mTLS client certificate file for authentication.
TLSClientCertPath string
// mTLS client key file for authentication.
TLSClientCert string
// mTLS client certificate for authentication.
TLSClientKeyPath string
// mTLS client key for authentication.
TLSClientKey string
}
HTTPClientOpts defines parameters that configure an HTTP client.
type HeaderRoundTripper ¶
type HeaderRoundTripper struct {
// contains filtered or unexported fields
}
HeaderRoundTripper injects Headers into requests made via RT.
Click to show internal directories.
Click to hide internal directories.