Documentation ¶
Index ¶
- Constants
- func CreateHTTPClient(timeout time.Duration, unsafeSsl bool) *http.Client
- func MaskPartOfURL(s string, part urlPart) (string, error)
- func NewTLSConfig(clientCert, clientKey, caCert string) (*tls.Config, error)
- func NewTLSConfigWithPassword(clientCert, clientKey, clientKeyPassword, caCert string) (*tls.Config, error)
- func NormalizeString(s string) string
- func ParseGVKR(restMapper meta.RESTMapper, apiVersion string, kind string) (kedav1alpha1.GroupVersionKindResource, error)
- func ResolveOsEnvDuration(envName string) (*time.Duration, error)
- func ResolveOsEnvInt(envName string, defaultValue int) (int, error)
- type HTTPDoer
- type K8sVersion
Constants ¶
const ( // Hostname is a constant refers to the hostname part of the url Hostname urlPart = "Hostname" // Password is a constant that refers to a password portion of the url if there is one Password urlPart = "Password" )
Variables ¶
This section is empty.
Functions ¶
func CreateHTTPClient ¶
CreateHTTPClient returns a new HTTP client with the timeout set to timeoutMS milliseconds, or 300 milliseconds if timeoutMS <= 0. unsafeSsl parameter allows to avoid tls cert validation if it's required
func MaskPartOfURL ¶
MaskPartOfURL will parse a url and returned a masked version or an error
func NewTLSConfig ¶
NewTLSConfig returns a *tls.Config using the given ceClient cert, ceClient key, and CA certificate. If none are appropriate, a nil *tls.Config is returned.
func NewTLSConfigWithPassword ¶ added in v2.8.0
func NewTLSConfigWithPassword(clientCert, clientKey, clientKeyPassword, caCert string) (*tls.Config, error)
NewTLSConfigWithPassword returns a *tls.Config using the given ceClient cert, ceClient key, and CA certificate. If clientKeyPassword is not empty the provided password will be used to decrypt the given key. If none are appropriate, a nil *tls.Config is returned.
func NormalizeString ¶
NormalizeString will replace all slashes, dots, colons and percent signs with dashes
func ParseGVKR ¶
func ParseGVKR(restMapper meta.RESTMapper, apiVersion string, kind string) (kedav1alpha1.GroupVersionKindResource, error)
ParseGVKR returns GroupVersionKindResource for specified apiVersion (groupVersion) and Kind
func ResolveOsEnvDuration ¶ added in v2.8.0
Types ¶
type HTTPDoer ¶
HTTPDoer is an interface that matches the Do method on (net/http).Client. It should be used in function signatures instead of raw *http.Clients wherever possible
type K8sVersion ¶
K8sVersion holds parsed data from a K8s version
func NewK8sVersion ¶
func NewK8sVersion(version *version.Info) K8sVersion
NewK8sVersion will parse a version info and return a struct