Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterBackupServer(s grpc.ServiceRegistrar, srv BackupServer)
- type BackupCapabilitiesRequest
- type BackupCapabilitiesResult
- func (*BackupCapabilitiesResult) Descriptor() ([]byte, []int)deprecated
- func (x *BackupCapabilitiesResult) GetCapabilities() []*BackupCapability
- func (*BackupCapabilitiesResult) ProtoMessage()
- func (x *BackupCapabilitiesResult) ProtoReflect() protoreflect.Message
- func (x *BackupCapabilitiesResult) Reset()
- func (x *BackupCapabilitiesResult) String() string
- type BackupCapability
- func (*BackupCapability) Descriptor() ([]byte, []int)deprecated
- func (x *BackupCapability) GetRpc() *BackupCapability_RPC
- func (x *BackupCapability) GetType() isBackupCapability_Type
- func (*BackupCapability) ProtoMessage()
- func (x *BackupCapability) ProtoReflect() protoreflect.Message
- func (x *BackupCapability) Reset()
- func (x *BackupCapability) String() string
- type BackupCapability_RPC
- func (*BackupCapability_RPC) Descriptor() ([]byte, []int)deprecated
- func (x *BackupCapability_RPC) GetType() BackupCapability_RPC_Type
- func (*BackupCapability_RPC) ProtoMessage()
- func (x *BackupCapability_RPC) ProtoReflect() protoreflect.Message
- func (x *BackupCapability_RPC) Reset()
- func (x *BackupCapability_RPC) String() string
- type BackupCapability_RPC_Type
- func (BackupCapability_RPC_Type) Descriptor() protoreflect.EnumDescriptor
- func (x BackupCapability_RPC_Type) Enum() *BackupCapability_RPC_Type
- func (BackupCapability_RPC_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x BackupCapability_RPC_Type) Number() protoreflect.EnumNumber
- func (x BackupCapability_RPC_Type) String() string
- func (BackupCapability_RPC_Type) Type() protoreflect.EnumType
- type BackupCapability_Rpc
- type BackupClient
- type BackupRequest
- func (*BackupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BackupRequest) GetBackupDefinition() []byte
- func (x *BackupRequest) GetClusterDefinition() []byte
- func (x *BackupRequest) GetParameters() map[string]string
- func (*BackupRequest) ProtoMessage()
- func (x *BackupRequest) ProtoReflect() protoreflect.Message
- func (x *BackupRequest) Reset()
- func (x *BackupRequest) String() string
- type BackupResult
- func (*BackupResult) Descriptor() ([]byte, []int)deprecated
- func (x *BackupResult) GetBackupId() string
- func (x *BackupResult) GetBackupLabelFile() []byte
- func (x *BackupResult) GetBackupName() string
- func (x *BackupResult) GetBeginLsn() string
- func (x *BackupResult) GetBeginWal() string
- func (x *BackupResult) GetEndLsn() string
- func (x *BackupResult) GetEndWal() string
- func (x *BackupResult) GetInstanceId() string
- func (x *BackupResult) GetMetadata() map[string]string
- func (x *BackupResult) GetOnline() bool
- func (x *BackupResult) GetStartedAt() int64
- func (x *BackupResult) GetStoppedAt() int64
- func (x *BackupResult) GetTablespaceMapFile() []byte
- func (*BackupResult) ProtoMessage()
- func (x *BackupResult) ProtoReflect() protoreflect.Message
- func (x *BackupResult) Reset()
- func (x *BackupResult) String() string
- type BackupServer
- type UnimplementedBackupServer
- type UnsafeBackupServer
Constants ¶
const ( Backup_GetCapabilities_FullMethodName = "/cnpgi.backup.v1.Backup/GetCapabilities" Backup_Backup_FullMethodName = "/cnpgi.backup.v1.Backup/Backup" )
Variables ¶
var ( BackupCapability_RPC_Type_name = map[int32]string{ 0: "TYPE_UNSPECIFIED", 1: "TYPE_BACKUP", } BackupCapability_RPC_Type_value = map[string]int32{ "TYPE_UNSPECIFIED": 0, "TYPE_BACKUP": 1, } )
Enum value maps for BackupCapability_RPC_Type.
var Backup_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cnpgi.backup.v1.Backup", HandlerType: (*BackupServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCapabilities", Handler: _Backup_GetCapabilities_Handler, }, { MethodName: "Backup", Handler: _Backup_Backup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/backup.proto", }
Backup_ServiceDesc is the grpc.ServiceDesc for Backup service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_backup_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBackupServer ¶
func RegisterBackupServer(s grpc.ServiceRegistrar, srv BackupServer)
Types ¶
type BackupCapabilitiesRequest ¶
type BackupCapabilitiesRequest struct {
// contains filtered or unexported fields
}
func (*BackupCapabilitiesRequest) Descriptor
deprecated
func (*BackupCapabilitiesRequest) Descriptor() ([]byte, []int)
Deprecated: Use BackupCapabilitiesRequest.ProtoReflect.Descriptor instead.
func (*BackupCapabilitiesRequest) ProtoMessage ¶
func (*BackupCapabilitiesRequest) ProtoMessage()
func (*BackupCapabilitiesRequest) ProtoReflect ¶
func (x *BackupCapabilitiesRequest) ProtoReflect() protoreflect.Message
func (*BackupCapabilitiesRequest) Reset ¶
func (x *BackupCapabilitiesRequest) Reset()
func (*BackupCapabilitiesRequest) String ¶
func (x *BackupCapabilitiesRequest) String() string
type BackupCapabilitiesResult ¶
type BackupCapabilitiesResult struct {
// All the capabilities that the controller service supports. This
// field is OPTIONAL.
Capabilities []*BackupCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
// contains filtered or unexported fields
}
func (*BackupCapabilitiesResult) Descriptor
deprecated
func (*BackupCapabilitiesResult) Descriptor() ([]byte, []int)
Deprecated: Use BackupCapabilitiesResult.ProtoReflect.Descriptor instead.
func (*BackupCapabilitiesResult) GetCapabilities ¶
func (x *BackupCapabilitiesResult) GetCapabilities() []*BackupCapability
func (*BackupCapabilitiesResult) ProtoMessage ¶
func (*BackupCapabilitiesResult) ProtoMessage()
func (*BackupCapabilitiesResult) ProtoReflect ¶
func (x *BackupCapabilitiesResult) ProtoReflect() protoreflect.Message
func (*BackupCapabilitiesResult) Reset ¶
func (x *BackupCapabilitiesResult) Reset()
func (*BackupCapabilitiesResult) String ¶
func (x *BackupCapabilitiesResult) String() string
type BackupCapability ¶
type BackupCapability struct {
// Types that are valid to be assigned to Type:
//
// *BackupCapability_Rpc
Type isBackupCapability_Type `protobuf_oneof:"type"`
// contains filtered or unexported fields
}
func (*BackupCapability) Descriptor
deprecated
func (*BackupCapability) Descriptor() ([]byte, []int)
Deprecated: Use BackupCapability.ProtoReflect.Descriptor instead.
func (*BackupCapability) GetRpc ¶
func (x *BackupCapability) GetRpc() *BackupCapability_RPC
func (*BackupCapability) GetType ¶
func (x *BackupCapability) GetType() isBackupCapability_Type
func (*BackupCapability) ProtoMessage ¶
func (*BackupCapability) ProtoMessage()
func (*BackupCapability) ProtoReflect ¶
func (x *BackupCapability) ProtoReflect() protoreflect.Message
func (*BackupCapability) Reset ¶
func (x *BackupCapability) Reset()
func (*BackupCapability) String ¶
func (x *BackupCapability) String() string
type BackupCapability_RPC ¶
type BackupCapability_RPC struct {
Type BackupCapability_RPC_Type `protobuf:"varint,1,opt,name=type,proto3,enum=cnpgi.backup.v1.BackupCapability_RPC_Type" json:"type,omitempty"`
// contains filtered or unexported fields
}
func (*BackupCapability_RPC) Descriptor
deprecated
func (*BackupCapability_RPC) Descriptor() ([]byte, []int)
Deprecated: Use BackupCapability_RPC.ProtoReflect.Descriptor instead.
func (*BackupCapability_RPC) GetType ¶
func (x *BackupCapability_RPC) GetType() BackupCapability_RPC_Type
func (*BackupCapability_RPC) ProtoMessage ¶
func (*BackupCapability_RPC) ProtoMessage()
func (*BackupCapability_RPC) ProtoReflect ¶
func (x *BackupCapability_RPC) ProtoReflect() protoreflect.Message
func (*BackupCapability_RPC) Reset ¶
func (x *BackupCapability_RPC) Reset()
func (*BackupCapability_RPC) String ¶
func (x *BackupCapability_RPC) String() string
type BackupCapability_RPC_Type ¶
type BackupCapability_RPC_Type int32
const ( BackupCapability_RPC_TYPE_UNSPECIFIED BackupCapability_RPC_Type = 0 // TYPE_BACKUP indicates that the Plugin is able to // take physical backups. This feature is required for every // plugin exposing the Backup service BackupCapability_RPC_TYPE_BACKUP BackupCapability_RPC_Type = 1 )
func (BackupCapability_RPC_Type) Descriptor ¶
func (BackupCapability_RPC_Type) Descriptor() protoreflect.EnumDescriptor
func (BackupCapability_RPC_Type) Enum ¶
func (x BackupCapability_RPC_Type) Enum() *BackupCapability_RPC_Type
func (BackupCapability_RPC_Type) EnumDescriptor
deprecated
func (BackupCapability_RPC_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use BackupCapability_RPC_Type.Descriptor instead.
func (BackupCapability_RPC_Type) Number ¶
func (x BackupCapability_RPC_Type) Number() protoreflect.EnumNumber
func (BackupCapability_RPC_Type) String ¶
func (x BackupCapability_RPC_Type) String() string
func (BackupCapability_RPC_Type) Type ¶
func (BackupCapability_RPC_Type) Type() protoreflect.EnumType
type BackupCapability_Rpc ¶
type BackupCapability_Rpc struct {
Rpc *BackupCapability_RPC `protobuf:"bytes,1,opt,name=rpc,proto3,oneof"`
}
type BackupClient ¶
type BackupClient interface {
// GetCapabilities gets the capabilities of the Backup service
GetCapabilities(ctx context.Context, in *BackupCapabilitiesRequest, opts ...grpc.CallOption) (*BackupCapabilitiesResult, error)
// Backup takes a physical backup of PostgreSQL.
Backup(ctx context.Context, in *BackupRequest, opts ...grpc.CallOption) (*BackupResult, error)
}
BackupClient is the client API for Backup service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewBackupClient ¶
func NewBackupClient(cc grpc.ClientConnInterface) BackupClient
type BackupRequest ¶
type BackupRequest struct {
// This field is REQUIRED. Value of this field is the JSON
// serialization of the Cluster being backed up
ClusterDefinition []byte `protobuf:"bytes,1,opt,name=cluster_definition,json=clusterDefinition,proto3" json:"cluster_definition,omitempty"`
// This field is REQUIRED. Value of this field is the JSON
// serialization of the Backup that is being taken
BackupDefinition []byte `protobuf:"bytes,2,opt,name=backup_definition,json=backupDefinition,proto3" json:"backup_definition,omitempty"`
// This field is OPTIONAL. Value of this field is the configuration
// of this backup as set in the Backup or in the ScheduledBackup object
Parameters map[string]string `` /* 147-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*BackupRequest) Descriptor
deprecated
func (*BackupRequest) Descriptor() ([]byte, []int)
Deprecated: Use BackupRequest.ProtoReflect.Descriptor instead.
func (*BackupRequest) GetBackupDefinition ¶
func (x *BackupRequest) GetBackupDefinition() []byte
func (*BackupRequest) GetClusterDefinition ¶
func (x *BackupRequest) GetClusterDefinition() []byte
func (*BackupRequest) GetParameters ¶
func (x *BackupRequest) GetParameters() map[string]string
func (*BackupRequest) ProtoMessage ¶
func (*BackupRequest) ProtoMessage()
func (*BackupRequest) ProtoReflect ¶
func (x *BackupRequest) ProtoReflect() protoreflect.Message
func (*BackupRequest) Reset ¶
func (x *BackupRequest) Reset()
func (*BackupRequest) String ¶
func (x *BackupRequest) String() string
type BackupResult ¶
type BackupResult struct {
// This field is REQUIRED and contains a machine-readable ID of the
// backup that is being taken
BackupId string `protobuf:"bytes,1,opt,name=backup_id,json=backupId,proto3" json:"backup_id,omitempty"`
// This field is OPTIONAL and contains a human-readable name of the
// backup that is being taken
BackupName string `protobuf:"bytes,2,opt,name=backup_name,json=backupName,proto3" json:"backup_name,omitempty"`
// This field is REQUIRED and contains the Unix timestamp of the start
// time of the backup
StartedAt int64 `protobuf:"varint,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
// This field is REQUIRED and contains the Unix timestamp of the end
// time of the backup
StoppedAt int64 `protobuf:"varint,4,opt,name=stopped_at,json=stoppedAt,proto3" json:"stopped_at,omitempty"`
// This field is OPTIONAL and contains the current WAL when the backup was started
BeginWal string `protobuf:"bytes,5,opt,name=begin_wal,json=beginWal,proto3" json:"begin_wal,omitempty"`
// This field is OPTIONAL and contains the current WAL at the end of the backup
EndWal string `protobuf:"bytes,6,opt,name=end_wal,json=endWal,proto3" json:"end_wal,omitempty"`
// This field is OPTIONAL and contains the current LSN record when the backup was started
BeginLsn string `protobuf:"bytes,7,opt,name=begin_lsn,json=beginLsn,proto3" json:"begin_lsn,omitempty"`
// This field is OPTIONAL and contains the current LSN record when the backup has finished
EndLsn string `protobuf:"bytes,8,opt,name=end_lsn,json=endLsn,proto3" json:"end_lsn,omitempty"`
// This field is OPTIONAL and contains the backup label of the backup that have been taken
BackupLabelFile []byte `protobuf:"bytes,9,opt,name=backup_label_file,json=backupLabelFile,proto3" json:"backup_label_file,omitempty"`
// This field is OPTIONAL and contains the tablespace map of the backup that have been taken
TablespaceMapFile []byte `protobuf:"bytes,10,opt,name=tablespace_map_file,json=tablespaceMapFile,proto3" json:"tablespace_map_file,omitempty"`
// This field is OPTIONAL and contains the ID of the instance that have been backed up
InstanceId string `protobuf:"bytes,11,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
// This field is REQUIRED and is set to true for online/hot backups and to false otherwise.
Online bool `protobuf:"varint,12,opt,name=online,proto3" json:"online,omitempty"`
// This field is OPTIONAL and contains all the plugin specific information that needs to be stored
Metadata map[string]string `` /* 144-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*BackupResult) Descriptor
deprecated
func (*BackupResult) Descriptor() ([]byte, []int)
Deprecated: Use BackupResult.ProtoReflect.Descriptor instead.
func (*BackupResult) GetBackupId ¶
func (x *BackupResult) GetBackupId() string
func (*BackupResult) GetBackupLabelFile ¶
func (x *BackupResult) GetBackupLabelFile() []byte
func (*BackupResult) GetBackupName ¶
func (x *BackupResult) GetBackupName() string
func (*BackupResult) GetBeginLsn ¶
func (x *BackupResult) GetBeginLsn() string
func (*BackupResult) GetBeginWal ¶
func (x *BackupResult) GetBeginWal() string
func (*BackupResult) GetEndLsn ¶
func (x *BackupResult) GetEndLsn() string
func (*BackupResult) GetEndWal ¶
func (x *BackupResult) GetEndWal() string
func (*BackupResult) GetInstanceId ¶
func (x *BackupResult) GetInstanceId() string
func (*BackupResult) GetMetadata ¶
func (x *BackupResult) GetMetadata() map[string]string
func (*BackupResult) GetOnline ¶
func (x *BackupResult) GetOnline() bool
func (*BackupResult) GetStartedAt ¶
func (x *BackupResult) GetStartedAt() int64
func (*BackupResult) GetStoppedAt ¶
func (x *BackupResult) GetStoppedAt() int64
func (*BackupResult) GetTablespaceMapFile ¶
func (x *BackupResult) GetTablespaceMapFile() []byte
func (*BackupResult) ProtoMessage ¶
func (*BackupResult) ProtoMessage()
func (*BackupResult) ProtoReflect ¶
func (x *BackupResult) ProtoReflect() protoreflect.Message
func (*BackupResult) Reset ¶
func (x *BackupResult) Reset()
func (*BackupResult) String ¶
func (x *BackupResult) String() string
type BackupServer ¶
type BackupServer interface {
// GetCapabilities gets the capabilities of the Backup service
GetCapabilities(context.Context, *BackupCapabilitiesRequest) (*BackupCapabilitiesResult, error)
// Backup takes a physical backup of PostgreSQL.
Backup(context.Context, *BackupRequest) (*BackupResult, error)
// contains filtered or unexported methods
}
BackupServer is the server API for Backup service. All implementations must embed UnimplementedBackupServer for forward compatibility.
type UnimplementedBackupServer ¶
type UnimplementedBackupServer struct{}
UnimplementedBackupServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedBackupServer) Backup ¶
func (UnimplementedBackupServer) Backup(context.Context, *BackupRequest) (*BackupResult, error)
func (UnimplementedBackupServer) GetCapabilities ¶
func (UnimplementedBackupServer) GetCapabilities(context.Context, *BackupCapabilitiesRequest) (*BackupCapabilitiesResult, error)
type UnsafeBackupServer ¶
type UnsafeBackupServer interface {
// contains filtered or unexported methods
}
UnsafeBackupServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BackupServer will result in compilation errors.