Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeInstanceGetter ¶
type FakeInstanceGetter struct { }
FakeInstanceGetter to be used for tests.
func (*FakeInstanceGetter) GetInstance ¶
func (g *FakeInstanceGetter) GetInstance(igURL string) (*compute.Instance, error)
GetInstance retuns a new instance.
type InstanceGetter ¶
type InstanceGetter struct {
// contains filtered or unexported fields
}
InstanceGetter is an implementation of InstanceGetterInterface.
func (*InstanceGetter) GetInstance ¶
func (g *InstanceGetter) GetInstance(igURL string) (*compute.Instance, error)
GetInstance gets an instance in the given instance group.
type InstanceGetterInterface ¶
type InstanceGetterInterface interface { // GetIntance returns an instance in the given instance group. // There is no guarantee regarding which instance is returned. // Calling this multiple times for the same instance group can return different instances. GetInstance(igURL string) (*compute.Instance, error) }
InstanceGetterInterface is an interface to fetch GCE instances. TODO(nikhiljindal): Move this logic to gce cloudprovider in kubernetes/kubernetes.
func NewFakeInstanceGetter ¶
func NewFakeInstanceGetter() InstanceGetterInterface
NewFakeInstanceGetter returns a new fake.
func NewInstanceGetter ¶
func NewInstanceGetter(projectID string) (InstanceGetterInterface, error)
NewInstanceGetter returns an InstanceGetter implementation.
Click to show internal directories.
Click to hide internal directories.