Expose the generate stub for compute API

This allows clients such as Ingress to begin migration to the newly
generated stubs.
This commit is contained in:
Bowei Du 2018-01-23 00:21:42 -08:00
parent 6afa03fcb8
commit 2514774707

View File

@ -229,6 +229,11 @@ func (g *GCECloud) ComputeServices() *Services {
return &Services{g.service, g.serviceAlpha, g.serviceBeta} return &Services{g.service, g.serviceAlpha, g.serviceBeta}
} }
// Compute returns the generated stubs for the compute API.
func (g *GCECloud) Compute() cloud.Cloud {
return g.c
}
// newGCECloud creates a new instance of GCECloud. // newGCECloud creates a new instance of GCECloud.
func newGCECloud(config io.Reader) (gceCloud *GCECloud, err error) { func newGCECloud(config io.Reader) (gceCloud *GCECloud, err error) {
var cloudConfig *CloudConfig var cloudConfig *CloudConfig