v1

package
v0.70.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Overview

Package replication/v1 contains the API of replication services.

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// APIID contains identifier of this API
	APIID = "replication/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 0
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 1
)
View Source
const (

	// PermissionDeploymentCloneFromBackup is needed to clone a deployment from an existing backup.
	PermissionDeploymentCloneFromBackup = "replication.deployment.clone-from-backup"
)

Variables

View Source
var (
	ErrInvalidLengthReplication = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReplication   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterReplicationServiceHandler

func RegisterReplicationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterReplicationServiceHandler registers the http handlers for service ReplicationService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterReplicationServiceHandlerClient

func RegisterReplicationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReplicationServiceClient) error

RegisterReplicationServiceHandlerClient registers the http handlers for service ReplicationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReplicationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReplicationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ReplicationServiceClient" to call the correct interceptors.

func RegisterReplicationServiceHandlerFromEndpoint

func RegisterReplicationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterReplicationServiceHandlerFromEndpoint is same as RegisterReplicationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterReplicationServiceHandlerServer

func RegisterReplicationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReplicationServiceServer) error

RegisterReplicationServiceHandlerServer registers the http handlers for service ReplicationService to "mux". UnaryRPC :call ReplicationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterReplicationServiceServer

func RegisterReplicationServiceServer(s *grpc.Server, srv ReplicationServiceServer)

Types

type CloneDeploymentFromBackupRequest

type CloneDeploymentFromBackupRequest struct {
	// The ID of the backup to clone a deployment from.
	BackupId string `protobuf:"bytes,1,opt,name=backup_id,json=backupId,proto3" json:"backup_id,omitempty"`
	// Target region.
	// This is an optional field
	RegionId string `protobuf:"bytes,2,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
	// This field must be set to the identifier of the current Terms&Conditions
	// when cloning a deployment.
	// If the tier of the organization does not require a non-empty Terms&Condition
	// identifier, this field may be left empty.
	// If this field is not set the terms and conditions of the source deployment will be used.
	AcceptedTermsAndConditionsId string   `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
	XXX_unrecognized             []byte   `json:"-"`
	XXX_sizecache                int32    `json:"-"`
}

CloneDeploymentFromBackupRequest defines a request object for clone deployment call.

func (*CloneDeploymentFromBackupRequest) Descriptor

func (*CloneDeploymentFromBackupRequest) Descriptor() ([]byte, []int)

func (*CloneDeploymentFromBackupRequest) GetAcceptedTermsAndConditionsId added in v0.50.3

func (m *CloneDeploymentFromBackupRequest) GetAcceptedTermsAndConditionsId() string

func (*CloneDeploymentFromBackupRequest) GetBackupId

func (m *CloneDeploymentFromBackupRequest) GetBackupId() string

func (*CloneDeploymentFromBackupRequest) GetRegionId

func (m *CloneDeploymentFromBackupRequest) GetRegionId() string

func (*CloneDeploymentFromBackupRequest) Marshal

func (m *CloneDeploymentFromBackupRequest) Marshal() (dAtA []byte, err error)

func (*CloneDeploymentFromBackupRequest) MarshalTo

func (m *CloneDeploymentFromBackupRequest) MarshalTo(dAtA []byte) (int, error)

func (*CloneDeploymentFromBackupRequest) MarshalToSizedBuffer

func (m *CloneDeploymentFromBackupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CloneDeploymentFromBackupRequest) ProtoMessage

func (*CloneDeploymentFromBackupRequest) ProtoMessage()

func (*CloneDeploymentFromBackupRequest) Reset

func (*CloneDeploymentFromBackupRequest) Size

func (m *CloneDeploymentFromBackupRequest) Size() (n int)

func (*CloneDeploymentFromBackupRequest) String

func (*CloneDeploymentFromBackupRequest) Unmarshal

func (m *CloneDeploymentFromBackupRequest) Unmarshal(dAtA []byte) error

func (*CloneDeploymentFromBackupRequest) XXX_DiscardUnknown

func (m *CloneDeploymentFromBackupRequest) XXX_DiscardUnknown()

func (*CloneDeploymentFromBackupRequest) XXX_Marshal

func (m *CloneDeploymentFromBackupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloneDeploymentFromBackupRequest) XXX_Merge

func (*CloneDeploymentFromBackupRequest) XXX_Size

func (m *CloneDeploymentFromBackupRequest) XXX_Size() int

func (*CloneDeploymentFromBackupRequest) XXX_Unmarshal

func (m *CloneDeploymentFromBackupRequest) XXX_Unmarshal(b []byte) error

type ReplicationServiceClient

type ReplicationServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
	// Takes a backup and creates a deployment from it. For all intents and purposes this new deployment
	// will be the same as the deployment at that exact moment when the backup was taken from it. This means that
	// the new deployment will be in the same project and use the same provider as the old deployment did. Optionally
	// a different region can be provided using the region id field on the request. Furthermore, the new deployment
	// will have the same server settings ( count, mode, replication factor ) as the old deployment did at the time
	// of taking the backup. After the new deployment successfully started, the backup will be used to restore the
	// data into the new deployment. The new deployment will have a different endpoint, and the password will also
	// be reset for it. All other user settings will remain the same.
	// The old deployment will not be touched.
	// Required permissions:
	// - replication.deployment.clone-from-backup
	CloneDeploymentFromBackup(ctx context.Context, in *CloneDeploymentFromBackupRequest, opts ...grpc.CallOption) (*v11.Deployment, error)
}

ReplicationServiceClient is the client API for ReplicationService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReplicationServiceClient

func NewReplicationServiceClient(cc *grpc.ClientConn) ReplicationServiceClient

type ReplicationServiceServer

type ReplicationServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
	// Takes a backup and creates a deployment from it. For all intents and purposes this new deployment
	// will be the same as the deployment at that exact moment when the backup was taken from it. This means that
	// the new deployment will be in the same project and use the same provider as the old deployment did. Optionally
	// a different region can be provided using the region id field on the request. Furthermore, the new deployment
	// will have the same server settings ( count, mode, replication factor ) as the old deployment did at the time
	// of taking the backup. After the new deployment successfully started, the backup will be used to restore the
	// data into the new deployment. The new deployment will have a different endpoint, and the password will also
	// be reset for it. All other user settings will remain the same.
	// The old deployment will not be touched.
	// Required permissions:
	// - replication.deployment.clone-from-backup
	CloneDeploymentFromBackup(context.Context, *CloneDeploymentFromBackupRequest) (*v11.Deployment, error)
}

ReplicationServiceServer is the server API for ReplicationService service.

type UnimplementedReplicationServiceServer

type UnimplementedReplicationServiceServer struct {
}

UnimplementedReplicationServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedReplicationServiceServer) CloneDeploymentFromBackup

func (*UnimplementedReplicationServiceServer) GetAPIVersion

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL