mirror of https://github.com/hashicorp/packer
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
177 lines
6.2 KiB
177 lines
6.2 KiB
// Code generated by sdkgen. DO NOT EDIT.
|
|
|
|
//nolint
|
|
package mysql
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mysql/v1"
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
|
|
)
|
|
|
|
//revive:disable
|
|
|
|
// ClusterServiceClient is a mysql.ClusterServiceClient with
|
|
// lazy GRPC connection initialization.
|
|
type ClusterServiceClient struct {
|
|
getConn func(ctx context.Context) (*grpc.ClientConn, error)
|
|
}
|
|
|
|
var _ mysql.ClusterServiceClient = &ClusterServiceClient{}
|
|
|
|
// AddHosts implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) AddHosts(ctx context.Context, in *mysql.AddClusterHostsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).AddHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// Backup implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Backup(ctx context.Context, in *mysql.BackupClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Backup(ctx, in, opts...)
|
|
}
|
|
|
|
// Create implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Create(ctx context.Context, in *mysql.CreateClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Create(ctx, in, opts...)
|
|
}
|
|
|
|
// Delete implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Delete(ctx context.Context, in *mysql.DeleteClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Delete(ctx, in, opts...)
|
|
}
|
|
|
|
// DeleteHosts implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) DeleteHosts(ctx context.Context, in *mysql.DeleteClusterHostsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).DeleteHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// Get implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Get(ctx context.Context, in *mysql.GetClusterRequest, opts ...grpc.CallOption) (*mysql.Cluster, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Get(ctx, in, opts...)
|
|
}
|
|
|
|
// List implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) List(ctx context.Context, in *mysql.ListClustersRequest, opts ...grpc.CallOption) (*mysql.ListClustersResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).List(ctx, in, opts...)
|
|
}
|
|
|
|
// ListBackups implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListBackups(ctx context.Context, in *mysql.ListClusterBackupsRequest, opts ...grpc.CallOption) (*mysql.ListClusterBackupsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).ListBackups(ctx, in, opts...)
|
|
}
|
|
|
|
// ListHosts implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListHosts(ctx context.Context, in *mysql.ListClusterHostsRequest, opts ...grpc.CallOption) (*mysql.ListClusterHostsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).ListHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// ListLogs implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListLogs(ctx context.Context, in *mysql.ListClusterLogsRequest, opts ...grpc.CallOption) (*mysql.ListClusterLogsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).ListLogs(ctx, in, opts...)
|
|
}
|
|
|
|
// ListOperations implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListOperations(ctx context.Context, in *mysql.ListClusterOperationsRequest, opts ...grpc.CallOption) (*mysql.ListClusterOperationsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).ListOperations(ctx, in, opts...)
|
|
}
|
|
|
|
// Move implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Move(ctx context.Context, in *mysql.MoveClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Move(ctx, in, opts...)
|
|
}
|
|
|
|
// Restore implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Restore(ctx context.Context, in *mysql.RestoreClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Restore(ctx, in, opts...)
|
|
}
|
|
|
|
// Start implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Start(ctx context.Context, in *mysql.StartClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Start(ctx, in, opts...)
|
|
}
|
|
|
|
// StartFailover implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) StartFailover(ctx context.Context, in *mysql.StartClusterFailoverRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).StartFailover(ctx, in, opts...)
|
|
}
|
|
|
|
// Stop implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Stop(ctx context.Context, in *mysql.StopClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Stop(ctx, in, opts...)
|
|
}
|
|
|
|
// Update implements mysql.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Update(ctx context.Context, in *mysql.UpdateClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return mysql.NewClusterServiceClient(conn).Update(ctx, in, opts...)
|
|
}
|