Documentation ¶
Index ¶
- type BackupDescriptor
- func (d *BackupDescriptor) AllExist(classes []string) string
- func (d *BackupDescriptor) Exclude(classes []string)
- func (d *BackupDescriptor) Filter(pred func(s string) bool)
- func (d *BackupDescriptor) Include(classes []string)
- func (d *BackupDescriptor) List() []string
- func (d *BackupDescriptor) ToDistributed() *DistributedBackupDescriptor
- func (d *BackupDescriptor) Validate() error
- type ClassDescriptor
- type CreateMeta
- type DistributedBackupDescriptor
- func (d *DistributedBackupDescriptor) AllExist(classes []string) string
- func (d *DistributedBackupDescriptor) Classes() []string
- func (d *DistributedBackupDescriptor) Count() int
- func (d *DistributedBackupDescriptor) Exclude(classes []string)
- func (d *DistributedBackupDescriptor) Filter(pred func(s string) bool)
- func (d *DistributedBackupDescriptor) Include(classes []string)
- func (d *DistributedBackupDescriptor) Len() int
- func (d *DistributedBackupDescriptor) RemoveEmpty() *DistributedBackupDescriptor
- func (d *DistributedBackupDescriptor) ResetStatus() *DistributedBackupDescriptor
- func (d *DistributedBackupDescriptor) Validate() error
- type ErrContextExpired
- type ErrInternal
- type ErrNotFound
- type ErrUnprocessable
- type NodeDescriptor
- type RestoreMeta
- type ShardDescriptor
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupDescriptor ¶
type BackupDescriptor struct { StartedAt time.Time `json:"startedAt"` CompletedAt time.Time `json:"completedAt"` ID string `json:"id"` // User created backup id Classes []ClassDescriptor `json:"classes"` Status string `json:"status"` // "STARTED|TRANSFERRING|TRANSFERRED|SUCCESS|FAILED" Version string `json:"version"` // ServerVersion string `json:"serverVersion"` Error string `json:"error"` }
BackupDescriptor contains everything needed to completely restore a list of classes
func (*BackupDescriptor) AllExist ¶
func (d *BackupDescriptor) AllExist(classes []string) string
AllExist checks if all classes exist in d. It returns either "" or the first class which it could not find
func (*BackupDescriptor) Exclude ¶
func (d *BackupDescriptor) Exclude(classes []string)
Exclude removes classes from d
func (*BackupDescriptor) Filter ¶
func (d *BackupDescriptor) Filter(pred func(s string) bool)
Filter classes based on predicate
func (*BackupDescriptor) Include ¶
func (d *BackupDescriptor) Include(classes []string)
Include only these classes and remove everything else
func (*BackupDescriptor) List ¶
func (d *BackupDescriptor) List() []string
List all existing classes in d
func (*BackupDescriptor) ToDistributed ¶
func (d *BackupDescriptor) ToDistributed() *DistributedBackupDescriptor
ToDistributed is used just for backward compatibility with the old version.
func (*BackupDescriptor) Validate ¶
func (d *BackupDescriptor) Validate() error
Validate validates d
type ClassDescriptor ¶
type ClassDescriptor struct { Name string `json:"name"` // DB class name, also selected by user Shards []ShardDescriptor `json:"shards"` ShardingState []byte `json:"shardingState"` Schema []byte `json:"schema"` Error error `json:"-"` }
ClassDescriptor contains everything needed to completely restore a class
type CreateMeta ¶
type DistributedBackupDescriptor ¶
type DistributedBackupDescriptor struct { StartedAt time.Time `json:"startedAt"` CompletedAt time.Time `json:"completedAt"` ID string `json:"id"` // User created backup id Nodes map[string]*NodeDescriptor `json:"nodes"` Status Status `json:"status"` // Version string `json:"version"` // ServerVersion string `json:"serverVersion"` Error string `json:"error"` }
DistributedBAckupDescriptor contains everything need to completely restore a distributed backup
func (*DistributedBackupDescriptor) AllExist ¶
func (d *DistributedBackupDescriptor) AllExist(classes []string) string
AllExist checks if all classes exist in d. It returns either "" or the first class which it could not find
func (*DistributedBackupDescriptor) Classes ¶
func (d *DistributedBackupDescriptor) Classes() []string
Classes returns all classes contained in d
func (*DistributedBackupDescriptor) Count ¶
func (d *DistributedBackupDescriptor) Count() int
Count number of classes
func (*DistributedBackupDescriptor) Exclude ¶
func (d *DistributedBackupDescriptor) Exclude(classes []string)
Exclude removes classes from d
func (*DistributedBackupDescriptor) Filter ¶
func (d *DistributedBackupDescriptor) Filter(pred func(s string) bool)
Filter classes based on predicate
func (*DistributedBackupDescriptor) Include ¶
func (d *DistributedBackupDescriptor) Include(classes []string)
Include only these classes and remove everything else
func (*DistributedBackupDescriptor) Len ¶
func (d *DistributedBackupDescriptor) Len() int
Len returns how many nodes exist in d
func (*DistributedBackupDescriptor) RemoveEmpty ¶
func (d *DistributedBackupDescriptor) RemoveEmpty() *DistributedBackupDescriptor
RemoveEmpty removes any nodes with an empty class list
func (*DistributedBackupDescriptor) ResetStatus ¶
func (d *DistributedBackupDescriptor) ResetStatus() *DistributedBackupDescriptor
resetStatus sets status and sub-statuses to Started It also empties error and sub-errors
func (*DistributedBackupDescriptor) Validate ¶
func (d *DistributedBackupDescriptor) Validate() error
type ErrContextExpired ¶
type ErrContextExpired struct {
// contains filtered or unexported fields
}
func NewErrContextExpired ¶
func NewErrContextExpired(err error) ErrContextExpired
func (ErrContextExpired) Error ¶
func (e ErrContextExpired) Error() string
type ErrInternal ¶
type ErrInternal struct {
// contains filtered or unexported fields
}
func NewErrInternal ¶
func NewErrInternal(err error) ErrInternal
func (ErrInternal) Error ¶
func (e ErrInternal) Error() string
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
func NewErrNotFound ¶
func NewErrNotFound(err error) ErrNotFound
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type ErrUnprocessable ¶
type ErrUnprocessable struct {
// contains filtered or unexported fields
}
func NewErrUnprocessable ¶
func NewErrUnprocessable(err error) ErrUnprocessable
func (ErrUnprocessable) Error ¶
func (e ErrUnprocessable) Error() string
type NodeDescriptor ¶
type NodeDescriptor struct { Classes []string `json:"classes"` Status Status `json:"status"` Error string `json:"error"` }
NodeDescriptor contains data related to one participant in DBRO
type RestoreMeta ¶
type ShardDescriptor ¶
type ShardDescriptor struct { Name string `json:"name"` Node string `json:"node"` Files []string `json:"files"` DocIDCounterPath string `json:"docIdCounterPath"` DocIDCounter []byte `json:"docIdCounter"` PropLengthTrackerPath string `json:"propLengthTrackerPath"` PropLengthTracker []byte `json:"propLengthTracker"` ShardVersionPath string `json:"shardVersionPath"` Version []byte `json:"version"` }
ShardDescriptor contains everything needed to completely restore a partition of a specific class