41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
// Code generated by sdkgen. DO NOT EDIT.
|
|
|
|
//nolint
|
|
package compute
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/compute/v1"
|
|
)
|
|
|
|
//revive:disable
|
|
|
|
// ZoneServiceClient is a compute.ZoneServiceClient with
|
|
// lazy GRPC connection initialization.
|
|
type ZoneServiceClient struct {
|
|
getConn func(ctx context.Context) (*grpc.ClientConn, error)
|
|
}
|
|
|
|
var _ compute.ZoneServiceClient = &ZoneServiceClient{}
|
|
|
|
// Get implements compute.ZoneServiceClient
|
|
func (c *ZoneServiceClient) Get(ctx context.Context, in *compute.GetZoneRequest, opts ...grpc.CallOption) (*compute.Zone, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return compute.NewZoneServiceClient(conn).Get(ctx, in, opts...)
|
|
}
|
|
|
|
// List implements compute.ZoneServiceClient
|
|
func (c *ZoneServiceClient) List(ctx context.Context, in *compute.ListZonesRequest, opts ...grpc.CallOption) (*compute.ListZonesResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return compute.NewZoneServiceClient(conn).List(ctx, in, opts...)
|
|
}
|