Documentation ¶
Overview ¶
Package iface defines an interface for accessing Google Compute & Container APIs, and helps mediate access to k8s clients. This is helpful for creating testable packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GKE ¶
type GKE interface { ZonePages(ctx context.Context, f func(zones *compute.ZoneList) error) error ClusterList(ctx context.Context, zone string) (*container.ListClustersResponse, error) GetKubeClient(c *container.Cluster) (kubernetes.Interface, error) }
GKE defines the interface used by the gke logic.
type GKEImpl ¶
type GKEImpl struct {
// contains filtered or unexported fields
}
GKEImpl implements the GKE interface.
func NewGKE ¶
func NewGKE(project string, compute *compute.Service, container *container.Service, getKubeClient func(c *container.Cluster) (kubernetes.Interface, error)) *GKEImpl
NewGKE creates a new GKE instance.
func (*GKEImpl) ClusterList ¶
func (g *GKEImpl) ClusterList(ctx context.Context, zone string) (*container.ListClustersResponse, error)
ClusterList wraps the container service Clusters.List method for the given zone.
func (*GKEImpl) GetKubeClient ¶
GetKubeClient returns a kubernetes interface for the given cluster.
Click to show internal directories.
Click to hide internal directories.