Documentation
¶
Overview ¶
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetAcceptedCiphers() map[string]uint16
- func GetClientTLSConfig(caFile, certFile, keyFile, serverName string, protos []string) (*tls.Config, error)
- func IsLeaseValid(pc clock.PassiveClock, lease coordinationv1api.Lease) bool
- func Normalize(s string) string
- func ParseLabels(labelStr string) (map[string]string, error)
- func PrettyPrintURL(urlEncode string) string
- func RedirectTo(to string) func(http.ResponseWriter, *http.Request)
- func RemovePortFromHost(host string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAcceptedCiphers ¶ added in v0.0.26
GetAcceptedCiphers returns all the ciphers supported by the crypto/tls package
func GetClientTLSConfig ¶
func GetClientTLSConfig(caFile, certFile, keyFile, serverName string, protos []string) (*tls.Config, error)
GetClientTLSConfig returns tlsConfig based on x509 certs
func IsLeaseValid ¶ added in v0.31.0
func IsLeaseValid(pc clock.PassiveClock, lease coordinationv1api.Lease) bool
func Normalize ¶
Normalize replaces underscores with hyphens we should always use hyphens instead of underscores when registering component flags
func ParseLabels ¶ added in v0.31.1
ParseLabels takes a comma-separated string of key-value pairs and returns a map of labels.
func PrettyPrintURL ¶ added in v0.0.15
PrettyPrintURL decodes the URL encoded input string and print each key=val pair separated by comma
func RedirectTo ¶ added in v0.0.17
func RedirectTo(to string) func(http.ResponseWriter, *http.Request)
RedirectTo redirects request to a certain destination.
func RemovePortFromHost ¶ added in v0.0.15
RemovePortFromHost removes port number from the host address that may be of the form "<host>:<port>" where the <host> can be an either an IPv4/6 address or a domain name
Types ¶
This section is empty.