240 lines
9.1 KiB
Go
240 lines
9.1 KiB
Go
// Code generated by sdkgen. DO NOT EDIT.
|
|
|
|
//nolint
|
|
package clickhouse
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/clickhouse/v1"
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
|
|
)
|
|
|
|
//revive:disable
|
|
|
|
// ClusterServiceClient is a clickhouse.ClusterServiceClient with
|
|
// lazy GRPC connection initialization.
|
|
type ClusterServiceClient struct {
|
|
getConn func(ctx context.Context) (*grpc.ClientConn, error)
|
|
}
|
|
|
|
var _ clickhouse.ClusterServiceClient = &ClusterServiceClient{}
|
|
|
|
// AddHosts implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) AddHosts(ctx context.Context, in *clickhouse.AddClusterHostsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).AddHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// AddShard implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) AddShard(ctx context.Context, in *clickhouse.AddClusterShardRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).AddShard(ctx, in, opts...)
|
|
}
|
|
|
|
// AddZookeeper implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) AddZookeeper(ctx context.Context, in *clickhouse.AddClusterZookeeperRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).AddZookeeper(ctx, in, opts...)
|
|
}
|
|
|
|
// Backup implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Backup(ctx context.Context, in *clickhouse.BackupClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Backup(ctx, in, opts...)
|
|
}
|
|
|
|
// Create implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Create(ctx context.Context, in *clickhouse.CreateClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Create(ctx, in, opts...)
|
|
}
|
|
|
|
// CreateExternalDictionary implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) CreateExternalDictionary(ctx context.Context, in *clickhouse.CreateClusterExternalDictionaryRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).CreateExternalDictionary(ctx, in, opts...)
|
|
}
|
|
|
|
// Delete implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Delete(ctx context.Context, in *clickhouse.DeleteClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Delete(ctx, in, opts...)
|
|
}
|
|
|
|
// DeleteExternalDictionary implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) DeleteExternalDictionary(ctx context.Context, in *clickhouse.DeleteClusterExternalDictionaryRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).DeleteExternalDictionary(ctx, in, opts...)
|
|
}
|
|
|
|
// DeleteHosts implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) DeleteHosts(ctx context.Context, in *clickhouse.DeleteClusterHostsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).DeleteHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// DeleteShard implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) DeleteShard(ctx context.Context, in *clickhouse.DeleteClusterShardRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).DeleteShard(ctx, in, opts...)
|
|
}
|
|
|
|
// Get implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Get(ctx context.Context, in *clickhouse.GetClusterRequest, opts ...grpc.CallOption) (*clickhouse.Cluster, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Get(ctx, in, opts...)
|
|
}
|
|
|
|
// GetShard implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) GetShard(ctx context.Context, in *clickhouse.GetClusterShardRequest, opts ...grpc.CallOption) (*clickhouse.Shard, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).GetShard(ctx, in, opts...)
|
|
}
|
|
|
|
// List implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) List(ctx context.Context, in *clickhouse.ListClustersRequest, opts ...grpc.CallOption) (*clickhouse.ListClustersResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).List(ctx, in, opts...)
|
|
}
|
|
|
|
// ListBackups implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListBackups(ctx context.Context, in *clickhouse.ListClusterBackupsRequest, opts ...grpc.CallOption) (*clickhouse.ListClusterBackupsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).ListBackups(ctx, in, opts...)
|
|
}
|
|
|
|
// ListHosts implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListHosts(ctx context.Context, in *clickhouse.ListClusterHostsRequest, opts ...grpc.CallOption) (*clickhouse.ListClusterHostsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).ListHosts(ctx, in, opts...)
|
|
}
|
|
|
|
// ListLogs implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListLogs(ctx context.Context, in *clickhouse.ListClusterLogsRequest, opts ...grpc.CallOption) (*clickhouse.ListClusterLogsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).ListLogs(ctx, in, opts...)
|
|
}
|
|
|
|
// ListOperations implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListOperations(ctx context.Context, in *clickhouse.ListClusterOperationsRequest, opts ...grpc.CallOption) (*clickhouse.ListClusterOperationsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).ListOperations(ctx, in, opts...)
|
|
}
|
|
|
|
// ListShards implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) ListShards(ctx context.Context, in *clickhouse.ListClusterShardsRequest, opts ...grpc.CallOption) (*clickhouse.ListClusterShardsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).ListShards(ctx, in, opts...)
|
|
}
|
|
|
|
// Move implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Move(ctx context.Context, in *clickhouse.MoveClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Move(ctx, in, opts...)
|
|
}
|
|
|
|
// Restore implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Restore(ctx context.Context, in *clickhouse.RestoreClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Restore(ctx, in, opts...)
|
|
}
|
|
|
|
// Start implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Start(ctx context.Context, in *clickhouse.StartClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Start(ctx, in, opts...)
|
|
}
|
|
|
|
// Stop implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Stop(ctx context.Context, in *clickhouse.StopClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Stop(ctx, in, opts...)
|
|
}
|
|
|
|
// Update implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) Update(ctx context.Context, in *clickhouse.UpdateClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).Update(ctx, in, opts...)
|
|
}
|
|
|
|
// UpdateShard implements clickhouse.ClusterServiceClient
|
|
func (c *ClusterServiceClient) UpdateShard(ctx context.Context, in *clickhouse.UpdateClusterShardRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return clickhouse.NewClusterServiceClient(conn).UpdateShard(ctx, in, opts...)
|
|
}
|