kubernetes: moved doc of client to the interface
This commit is contained in:
parent
7f4eddf6d6
commit
9236a43a4d
1 changed files with 3 additions and 3 deletions
|
@ -18,6 +18,8 @@ import (
|
||||||
const resyncPeriod = time.Minute * 5
|
const resyncPeriod = time.Minute * 5
|
||||||
|
|
||||||
// Client is a client for the Kubernetes master.
|
// Client is a client for the Kubernetes master.
|
||||||
|
// WatchAll starts the watch of the Kubernetes ressources and updates the stores.
|
||||||
|
// The stores can then be accessed via the Get* functions.
|
||||||
type Client interface {
|
type Client interface {
|
||||||
GetIngresses(namespaces Namespaces) []*v1beta1.Ingress
|
GetIngresses(namespaces Namespaces) []*v1beta1.Ingress
|
||||||
GetService(namespace, name string) (*v1.Service, bool, error)
|
GetService(namespace, name string) (*v1.Service, bool, error)
|
||||||
|
@ -37,9 +39,7 @@ type clientImpl struct {
|
||||||
clientset *kubernetes.Clientset
|
clientset *kubernetes.Clientset
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewInClusterClient returns a new Kubernetes client.
|
// NewInClusterClient returns a new Kubernetes client that expect to run inside the cluster
|
||||||
// WatchAll starts the watch of the Kubernetes ressources and updates the stores.
|
|
||||||
// The stores can be accessed via the Get* functions.
|
|
||||||
func NewInClusterClient() (Client, error) {
|
func NewInClusterClient() (Client, error) {
|
||||||
config, err := rest.InClusterConfig()
|
config, err := rest.InClusterConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue