2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-07-05 08:39:17 -04:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
compute "cloud.google.com/go/compute/apiv1"
|
2022-12-08 05:26:51 -05:00
|
|
|
"cloud.google.com/go/compute/apiv1/computepb"
|
2022-07-05 08:39:17 -04:00
|
|
|
"github.com/googleapis/gax-go/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
type instanceTemplateClient struct {
|
|
|
|
*compute.InstanceTemplatesClient
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceTemplateClient) Close() error {
|
|
|
|
return c.InstanceTemplatesClient.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceTemplateClient) Delete(ctx context.Context, req *computepb.DeleteInstanceTemplateRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (Operation, error) {
|
|
|
|
return c.InstanceTemplatesClient.Delete(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceTemplateClient) Insert(ctx context.Context, req *computepb.InsertInstanceTemplateRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (Operation, error) {
|
|
|
|
return c.InstanceTemplatesClient.Insert(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
type instanceGroupManagersClient struct {
|
|
|
|
*compute.InstanceGroupManagersClient
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceGroupManagersClient) Close() error {
|
|
|
|
return c.InstanceGroupManagersClient.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceGroupManagersClient) Get(ctx context.Context, req *computepb.GetInstanceGroupManagerRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (*computepb.InstanceGroupManager, error) {
|
|
|
|
return c.InstanceGroupManagersClient.Get(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
2022-07-29 09:00:15 -04:00
|
|
|
func (c *instanceGroupManagersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstanceGroupManagersRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) InstanceGroupManagerScopedListIterator {
|
|
|
|
return c.InstanceGroupManagersClient.AggregatedList(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
2022-07-05 08:39:17 -04:00
|
|
|
func (c *instanceGroupManagersClient) SetInstanceTemplate(ctx context.Context, req *computepb.SetInstanceTemplateInstanceGroupManagerRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (Operation, error) {
|
|
|
|
return c.InstanceGroupManagersClient.SetInstanceTemplate(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesInstanceGroupManagerRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (Operation, error) {
|
|
|
|
return c.InstanceGroupManagersClient.CreateInstances(ctx, req, opts...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *instanceGroupManagersClient) DeleteInstances(ctx context.Context, req *computepb.DeleteInstancesInstanceGroupManagerRequest,
|
|
|
|
opts ...gax.CallOption,
|
|
|
|
) (Operation, error) {
|
|
|
|
return c.InstanceGroupManagersClient.DeleteInstances(ctx, req, opts...)
|
|
|
|
}
|