April 2018
Intermediate to advanced
468 pages
14h 34m
English
The cloud-provider interface is a collection of Go data types and interfaces. It is defined in a file called cloud.go, available at http://bit.ly/2fq4NbW. Here is the main interface:
type Interface interface {
Initialize(clientBuilder controller.ControllerClientBuilder)
LoadBalancer() (LoadBalancer, bool)
Instances() (Instances, bool)
Zones() (Zones, bool)
Clusters() (Clusters, bool)
Routes() (Routes, bool)
ProviderName() string
HasClusterID() bool
}
This is very clear. Kubernetes operates in terms of instances, Zones, Clusters, and Routes, and also requires access to a load balancer and provider name. The main interface is primarily a gateway. Most methods return other interfaces.
For example, the Clusters
Read now
Unlock full access