Documentation
¶
Index ¶
- Constants
- func CheckService(namespace string, service string) error
- func CreateSecret(namespace, name string, dataValues map[string]string, labels map[string]string) error
- func DeleteSecret(namespace, name string) error
- func GetServiceListByLabel(namespace string, key string, value string) (*core.ServiceList, error)
- func OptionallyHTTPSFormattedURLString(bareURLString string, https bool) (string, bool)
- func PrintServiceList(writer io.Writer, data [][]string)
- func WaitForService(api libmachine.API, namespace string, service string, ...) ([]string, error)
- type K8sClient
- type K8sClientGetter
- type SvcURL
- type URLs
Constants ¶
const ( // DefaultWait is the default wait time, in seconds DefaultWait = 2 // DefaultInterval is the default interval, in seconds DefaultInterval = 1 )
Variables ¶
This section is empty.
Functions ¶
func CheckService ¶
CheckService checks if a service is listening on a port.
func CreateSecret ¶
func CreateSecret(namespace, name string, dataValues map[string]string, labels map[string]string) error
CreateSecret creates or modifies secrets
func DeleteSecret ¶
DeleteSecret deletes a secret from a namespace
func GetServiceListByLabel ¶
GetServiceListByLabel returns a ServiceList by label
func OptionallyHTTPSFormattedURLString ¶ added in v0.31.0
OptionallyHTTPSFormattedURLString returns a formatted URL string, optionally HTTPS
func PrintServiceList ¶ added in v1.3.0
PrintServiceList prints a list of services as a table which has "Namespace", "Name" and "URL" columns to a writer
Types ¶
type K8sClient ¶
type K8sClient interface { GetCoreClient() (typed_core.CoreV1Interface, error) GetClientset(timeout time.Duration) (*kubernetes.Clientset, error) }
K8sClient represents a kubernetes client
var K8s K8sClient
K8s is the current K8sClient
type K8sClientGetter ¶
type K8sClientGetter struct{}
K8sClientGetter can get a K8sClient
func (*K8sClientGetter) GetClientset ¶ added in v0.22.2
func (*K8sClientGetter) GetClientset(timeout time.Duration) (*kubernetes.Clientset, error)
GetClientset returns a clientset
func (*K8sClientGetter) GetCoreClient ¶
func (k *K8sClientGetter) GetCoreClient() (typed_core.CoreV1Interface, error)
GetCoreClient returns a core client
type SvcURL ¶ added in v1.4.0
SvcURL represents a service URL. Each item in the URLs field combines the service URL with one of the configured node ports. The PortNames field contains the configured names of the ports in the URLs field (sorted correspondingly - first item in PortNames belongs to the first item in URLs).
func GetServiceURLsForService ¶
func GetServiceURLsForService(api libmachine.API, namespace, service string, t *template.Template) (SvcURL, error)
GetServiceURLsForService returns a SvcUrl object for a service in a namespace. Supports optional formatting.
type URLs ¶ added in v0.31.0
type URLs []SvcURL
URLs represents a list of URL
func GetServiceURLs ¶
GetServiceURLs returns a SvcURL object for every service in a particular namespace. Accepts a template for formatting