Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateObjectID() string
- func IsActive(o Operation) bool
- func IssuesToString(issues []*Ydb_Issue.IssueMessage) string
- func MakeYdbConnectionString(params YdbConnectionParams) string
- func OperationToString(o Operation) string
- func ParseCronExpr(str string) (*cronexpr.Expression, error)
- func ParseObjectID(string string) (string, error)
- type Backup
- type BackupSchedule
- type DeleteBackupOperation
- func (o *DeleteBackupOperation) Copy() Operation
- func (o *DeleteBackupOperation) GetAudit() *pb.AuditInfo
- func (o *DeleteBackupOperation) GetContainerID() string
- func (o *DeleteBackupOperation) GetID() string
- func (o *DeleteBackupOperation) GetMessage() string
- func (o *DeleteBackupOperation) GetState() OperationState
- func (o *DeleteBackupOperation) GetType() OperationType
- func (o *DeleteBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
- func (o *DeleteBackupOperation) Proto() *pb.Operation
- func (o *DeleteBackupOperation) SetID(id string)
- func (o *DeleteBackupOperation) SetMessage(m string)
- func (o *DeleteBackupOperation) SetState(s OperationState)
- func (o *DeleteBackupOperation) SetType(_ OperationType)
- func (o *DeleteBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
- type ExportSettings
- type GenericOperation
- func (o *GenericOperation) Copy() Operation
- func (o *GenericOperation) GetAudit() *pb.AuditInfo
- func (o *GenericOperation) GetContainerID() string
- func (o *GenericOperation) GetID() string
- func (o *GenericOperation) GetMessage() string
- func (o *GenericOperation) GetState() OperationState
- func (o *GenericOperation) GetType() OperationType
- func (o *GenericOperation) GetUpdatedAt() *timestamppb.Timestamp
- func (o *GenericOperation) Proto() *pb.Operation
- func (o *GenericOperation) SetID(id string)
- func (o *GenericOperation) SetMessage(m string)
- func (o *GenericOperation) SetState(s OperationState)
- func (o *GenericOperation) SetType(t OperationType)
- func (o *GenericOperation) SetUpdatedAt(t *timestamppb.Timestamp)
- type ImportSettings
- type Operation
- type OperationHandler
- type OperationState
- type OperationType
- type RestoreBackupOperation
- func (o *RestoreBackupOperation) Copy() Operation
- func (o *RestoreBackupOperation) GetAudit() *pb.AuditInfo
- func (o *RestoreBackupOperation) GetContainerID() string
- func (o *RestoreBackupOperation) GetID() string
- func (o *RestoreBackupOperation) GetMessage() string
- func (o *RestoreBackupOperation) GetState() OperationState
- func (o *RestoreBackupOperation) GetType() OperationType
- func (o *RestoreBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
- func (o *RestoreBackupOperation) Proto() *pb.Operation
- func (o *RestoreBackupOperation) SetID(id string)
- func (o *RestoreBackupOperation) SetMessage(m string)
- func (o *RestoreBackupOperation) SetState(s OperationState)
- func (o *RestoreBackupOperation) SetType(_ OperationType)
- func (o *RestoreBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
- type TakeBackupOperation
- func (o *TakeBackupOperation) Copy() Operation
- func (o *TakeBackupOperation) GetAudit() *pb.AuditInfo
- func (o *TakeBackupOperation) GetContainerID() string
- func (o *TakeBackupOperation) GetID() string
- func (o *TakeBackupOperation) GetMessage() string
- func (o *TakeBackupOperation) GetState() OperationState
- func (o *TakeBackupOperation) GetType() OperationType
- func (o *TakeBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
- func (o *TakeBackupOperation) Proto() *pb.Operation
- func (o *TakeBackupOperation) SetID(id string)
- func (o *TakeBackupOperation) SetMessage(m string)
- func (o *TakeBackupOperation) SetState(s OperationState)
- func (o *TakeBackupOperation) SetType(_ OperationType)
- func (o *TakeBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
- type TakeBackupWithRetryOperation
- func (o *TakeBackupWithRetryOperation) Copy() Operation
- func (o *TakeBackupWithRetryOperation) GetAudit() *pb.AuditInfo
- func (o *TakeBackupWithRetryOperation) GetContainerID() string
- func (o *TakeBackupWithRetryOperation) GetID() string
- func (o *TakeBackupWithRetryOperation) GetMessage() string
- func (o *TakeBackupWithRetryOperation) GetState() OperationState
- func (o *TakeBackupWithRetryOperation) GetType() OperationType
- func (o *TakeBackupWithRetryOperation) GetUpdatedAt() *timestamppb.Timestamp
- func (o *TakeBackupWithRetryOperation) Proto() *pb.Operation
- func (o *TakeBackupWithRetryOperation) SetID(id string)
- func (o *TakeBackupWithRetryOperation) SetMessage(m string)
- func (o *TakeBackupWithRetryOperation) SetState(s OperationState)
- func (o *TakeBackupWithRetryOperation) SetType(_ OperationType)
- func (o *TakeBackupWithRetryOperation) SetUpdatedAt(t *timestamppb.Timestamp)
- type YdbConnectionParams
Constants ¶
View Source
const ( OperationTypeTB = OperationType("TB") OperationTypeRB = OperationType("RB") OperationTypeDB = OperationType("DB") OperationTypeTBR = OperationType("TBR") BackupTimestampFormat = "20060102_150405" OperationCreatorName = "ydbcp" )
Variables ¶
View Source
var ( BackupStateUnknown = pb.Backup_STATUS_UNSPECIFIED.String() BackupStatePending = pb.Backup_PENDING.String() BackupStateRunning = pb.Backup_RUNNING.String() BackupStateAvailable = pb.Backup_AVAILABLE.String() BackupStateError = pb.Backup_ERROR.String() BackupStateCancelled = pb.Backup_CANCELLED.String() BackupStateDeleting = pb.Backup_DELETING.String() BackupStateDeleted = pb.Backup_DELETED.String() )
View Source
var ( BackupScheduleStateUnknown = pb.BackupSchedule_STATUS_UNSPECIFIED.String() BackupScheduleStateActive = pb.BackupSchedule_ACTIVE.String() BackupScheduleStateInactive = pb.BackupSchedule_INACTIVE.String() BackupScheduleStateDeleted = pb.BackupSchedule_DELETED.String() )
View Source
var ( OperationStateUnknown = OperationState(pb.Operation_STATUS_UNSPECIFIED.String()) OperationStatePending = OperationState(pb.Operation_PENDING.String()) OperationStateRunning = OperationState(pb.Operation_RUNNING.String()) OperationStateDone = OperationState(pb.Operation_DONE.String()) OperationStateError = OperationState(pb.Operation_ERROR.String()) OperationStateCancelling = OperationState(pb.Operation_CANCELLING.String()) OperationStateCancelled = OperationState(pb.Operation_CANCELED.String()) OperationStateStartCancelling = OperationState(pb.Operation_START_CANCELLING.String()) )
Functions ¶
func GenerateObjectID ¶
func GenerateObjectID() string
func IssuesToString ¶
func IssuesToString(issues []*Ydb_Issue.IssueMessage) string
func MakeYdbConnectionString ¶
func MakeYdbConnectionString(params YdbConnectionParams) string
func OperationToString ¶
func ParseCronExpr ¶
func ParseCronExpr(str string) (*cronexpr.Expression, error)
func ParseObjectID ¶
Types ¶
type Backup ¶
type Backup struct { ID string ContainerID string DatabaseName string DatabaseEndpoint string S3Endpoint string S3Region string S3Bucket string S3PathPrefix string Status string Message string AuditInfo *pb.AuditInfo Size int64 ScheduleID *string ExpireAt *time.Time SourcePaths []string }
func (*Backup) CanBeDeleted ¶
type BackupSchedule ¶
type BackupSchedule struct { ID string ContainerID string DatabaseName string DatabaseEndpoint string SourcePaths []string SourcePathsToExclude []string Audit *pb.AuditInfo Name *string Status string ScheduleSettings *pb.BackupScheduleSettings NextLaunch *time.Time LastBackupID *string LastSuccessfulBackupID *string RecoveryPoint *time.Time }
func (*BackupSchedule) Proto ¶
func (b *BackupSchedule) Proto(clock clockwork.Clock) *pb.BackupSchedule
func (*BackupSchedule) String ¶
func (b *BackupSchedule) String() string
func (*BackupSchedule) UpdateNextLaunch ¶
func (b *BackupSchedule) UpdateNextLaunch(now time.Time) error
type DeleteBackupOperation ¶
type DeleteBackupOperation struct { ID string ContainerID string YdbConnectionParams YdbConnectionParams BackupID string State OperationState Message string PathPrefix string Audit *pb.AuditInfo UpdatedAt *timestamppb.Timestamp }
func (*DeleteBackupOperation) Copy ¶
func (o *DeleteBackupOperation) Copy() Operation
func (*DeleteBackupOperation) GetAudit ¶
func (o *DeleteBackupOperation) GetAudit() *pb.AuditInfo
func (*DeleteBackupOperation) GetContainerID ¶
func (o *DeleteBackupOperation) GetContainerID() string
func (*DeleteBackupOperation) GetID ¶
func (o *DeleteBackupOperation) GetID() string
func (*DeleteBackupOperation) GetMessage ¶
func (o *DeleteBackupOperation) GetMessage() string
func (*DeleteBackupOperation) GetState ¶
func (o *DeleteBackupOperation) GetState() OperationState
func (*DeleteBackupOperation) GetType ¶
func (o *DeleteBackupOperation) GetType() OperationType
func (*DeleteBackupOperation) GetUpdatedAt ¶
func (o *DeleteBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
func (*DeleteBackupOperation) Proto ¶
func (o *DeleteBackupOperation) Proto() *pb.Operation
func (*DeleteBackupOperation) SetID ¶
func (o *DeleteBackupOperation) SetID(id string)
func (*DeleteBackupOperation) SetMessage ¶
func (o *DeleteBackupOperation) SetMessage(m string)
func (*DeleteBackupOperation) SetState ¶
func (o *DeleteBackupOperation) SetState(s OperationState)
func (*DeleteBackupOperation) SetType ¶
func (o *DeleteBackupOperation) SetType(_ OperationType)
func (*DeleteBackupOperation) SetUpdatedAt ¶
func (o *DeleteBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
type ExportSettings ¶
type GenericOperation ¶
type GenericOperation struct { ID string ContainerID string Type OperationType State OperationState Message string UpdatedAt *timestamppb.Timestamp }
func (*GenericOperation) Copy ¶
func (o *GenericOperation) Copy() Operation
func (*GenericOperation) GetAudit ¶
func (o *GenericOperation) GetAudit() *pb.AuditInfo
func (*GenericOperation) GetContainerID ¶
func (o *GenericOperation) GetContainerID() string
func (*GenericOperation) GetID ¶
func (o *GenericOperation) GetID() string
func (*GenericOperation) GetMessage ¶
func (o *GenericOperation) GetMessage() string
func (*GenericOperation) GetState ¶
func (o *GenericOperation) GetState() OperationState
func (*GenericOperation) GetType ¶
func (o *GenericOperation) GetType() OperationType
func (*GenericOperation) GetUpdatedAt ¶
func (o *GenericOperation) GetUpdatedAt() *timestamppb.Timestamp
func (*GenericOperation) Proto ¶
func (o *GenericOperation) Proto() *pb.Operation
func (*GenericOperation) SetID ¶
func (o *GenericOperation) SetID(id string)
func (*GenericOperation) SetMessage ¶
func (o *GenericOperation) SetMessage(m string)
func (*GenericOperation) SetState ¶
func (o *GenericOperation) SetState(s OperationState)
func (*GenericOperation) SetType ¶
func (o *GenericOperation) SetType(t OperationType)
func (*GenericOperation) SetUpdatedAt ¶
func (o *GenericOperation) SetUpdatedAt(t *timestamppb.Timestamp)
type ImportSettings ¶
type Operation ¶
type Operation interface { GetID() string SetID(id string) GetContainerID() string GetType() OperationType SetType(t OperationType) GetState() OperationState SetState(s OperationState) GetMessage() string SetMessage(m string) GetAudit() *pb.AuditInfo GetUpdatedAt() *timestamppb.Timestamp SetUpdatedAt(t *timestamppb.Timestamp) Copy() Operation Proto() *pb.Operation }
type OperationState ¶
type OperationState string
func (OperationState) Enum ¶
func (o OperationState) Enum() pb.Operation_Status
func (OperationState) String ¶
func (o OperationState) String() string
type OperationType ¶
type OperationType string
func (OperationType) String ¶
func (o OperationType) String() string
type RestoreBackupOperation ¶
type RestoreBackupOperation struct { ID string ContainerID string BackupId string State OperationState Message string YdbConnectionParams YdbConnectionParams YdbOperationId string // TODO: this field is not used, because DestinationPaths // will be constructed from SourcePaths and DestinationPrefix DestinationPaths []string SourcePaths []string DestinationPrefix string Audit *pb.AuditInfo UpdatedAt *timestamppb.Timestamp }
func (*RestoreBackupOperation) Copy ¶
func (o *RestoreBackupOperation) Copy() Operation
func (*RestoreBackupOperation) GetAudit ¶
func (o *RestoreBackupOperation) GetAudit() *pb.AuditInfo
func (*RestoreBackupOperation) GetContainerID ¶
func (o *RestoreBackupOperation) GetContainerID() string
func (*RestoreBackupOperation) GetID ¶
func (o *RestoreBackupOperation) GetID() string
func (*RestoreBackupOperation) GetMessage ¶
func (o *RestoreBackupOperation) GetMessage() string
func (*RestoreBackupOperation) GetState ¶
func (o *RestoreBackupOperation) GetState() OperationState
func (*RestoreBackupOperation) GetType ¶
func (o *RestoreBackupOperation) GetType() OperationType
func (*RestoreBackupOperation) GetUpdatedAt ¶
func (o *RestoreBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
func (*RestoreBackupOperation) Proto ¶
func (o *RestoreBackupOperation) Proto() *pb.Operation
func (*RestoreBackupOperation) SetID ¶
func (o *RestoreBackupOperation) SetID(id string)
func (*RestoreBackupOperation) SetMessage ¶
func (o *RestoreBackupOperation) SetMessage(m string)
func (*RestoreBackupOperation) SetState ¶
func (o *RestoreBackupOperation) SetState(s OperationState)
func (*RestoreBackupOperation) SetType ¶
func (o *RestoreBackupOperation) SetType(_ OperationType)
func (*RestoreBackupOperation) SetUpdatedAt ¶
func (o *RestoreBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
type TakeBackupOperation ¶
type TakeBackupOperation struct { ID string ContainerID string BackupID string State OperationState Message string YdbConnectionParams YdbConnectionParams YdbOperationId string SourcePaths []string SourcePathsToExclude []string Audit *pb.AuditInfo UpdatedAt *timestamppb.Timestamp ParentOperationID *string }
func (*TakeBackupOperation) Copy ¶
func (o *TakeBackupOperation) Copy() Operation
func (*TakeBackupOperation) GetAudit ¶
func (o *TakeBackupOperation) GetAudit() *pb.AuditInfo
func (*TakeBackupOperation) GetContainerID ¶
func (o *TakeBackupOperation) GetContainerID() string
func (*TakeBackupOperation) GetID ¶
func (o *TakeBackupOperation) GetID() string
func (*TakeBackupOperation) GetMessage ¶
func (o *TakeBackupOperation) GetMessage() string
func (*TakeBackupOperation) GetState ¶
func (o *TakeBackupOperation) GetState() OperationState
func (*TakeBackupOperation) GetType ¶
func (o *TakeBackupOperation) GetType() OperationType
func (*TakeBackupOperation) GetUpdatedAt ¶
func (o *TakeBackupOperation) GetUpdatedAt() *timestamppb.Timestamp
func (*TakeBackupOperation) Proto ¶
func (o *TakeBackupOperation) Proto() *pb.Operation
func (*TakeBackupOperation) SetID ¶
func (o *TakeBackupOperation) SetID(id string)
func (*TakeBackupOperation) SetMessage ¶
func (o *TakeBackupOperation) SetMessage(m string)
func (*TakeBackupOperation) SetState ¶
func (o *TakeBackupOperation) SetState(s OperationState)
func (*TakeBackupOperation) SetType ¶
func (o *TakeBackupOperation) SetType(_ OperationType)
func (*TakeBackupOperation) SetUpdatedAt ¶
func (o *TakeBackupOperation) SetUpdatedAt(t *timestamppb.Timestamp)
type TakeBackupWithRetryOperation ¶
type TakeBackupWithRetryOperation struct { ID string ContainerID string BackupID string State OperationState Message string YdbConnectionParams YdbConnectionParams YdbOperationId string SourcePaths []string SourcePathsToExclude []string Audit *pb.AuditInfo UpdatedAt *timestamppb.Timestamp }
func (*TakeBackupWithRetryOperation) Copy ¶
func (o *TakeBackupWithRetryOperation) Copy() Operation
func (*TakeBackupWithRetryOperation) GetAudit ¶
func (o *TakeBackupWithRetryOperation) GetAudit() *pb.AuditInfo
func (*TakeBackupWithRetryOperation) GetContainerID ¶
func (o *TakeBackupWithRetryOperation) GetContainerID() string
func (*TakeBackupWithRetryOperation) GetID ¶
func (o *TakeBackupWithRetryOperation) GetID() string
func (*TakeBackupWithRetryOperation) GetMessage ¶
func (o *TakeBackupWithRetryOperation) GetMessage() string
func (*TakeBackupWithRetryOperation) GetState ¶
func (o *TakeBackupWithRetryOperation) GetState() OperationState
func (*TakeBackupWithRetryOperation) GetType ¶
func (o *TakeBackupWithRetryOperation) GetType() OperationType
func (*TakeBackupWithRetryOperation) GetUpdatedAt ¶
func (o *TakeBackupWithRetryOperation) GetUpdatedAt() *timestamppb.Timestamp
func (*TakeBackupWithRetryOperation) Proto ¶
func (o *TakeBackupWithRetryOperation) Proto() *pb.Operation
func (*TakeBackupWithRetryOperation) SetID ¶
func (o *TakeBackupWithRetryOperation) SetID(id string)
func (*TakeBackupWithRetryOperation) SetMessage ¶
func (o *TakeBackupWithRetryOperation) SetMessage(m string)
func (*TakeBackupWithRetryOperation) SetState ¶
func (o *TakeBackupWithRetryOperation) SetState(s OperationState)
func (*TakeBackupWithRetryOperation) SetType ¶
func (o *TakeBackupWithRetryOperation) SetType(_ OperationType)
func (*TakeBackupWithRetryOperation) SetUpdatedAt ¶
func (o *TakeBackupWithRetryOperation) SetUpdatedAt(t *timestamppb.Timestamp)
type YdbConnectionParams ¶
Click to show internal directories.
Click to hide internal directories.