Documentation ¶
Index ¶
- Constants
- func CheckRestoreTime(dataURI, logURI string, scn int64) (err error)
- func CopyDirs(src, dest string) (err error)
- func CopyFile(src, dest string) error
- func ExecCommand(command string) (string, error)
- func GetAddressList() ([]string, error)
- func GetAllAddressList() ([]string, error)
- func GetBinaryVersion(path string) (string, error)
- func GetFsId(path string) (string, syscall.Fsid, error)
- func GetResourceType(uri string) (t string, err error)
- func IsDirEmpty(path string) (bool, error)
- func IsFileExist(path string) bool
- func ParseTime(s string) (duration time.Duration, err error)
- func ParseTimeWithRange(s string, minUnit, maxUnit time.Duration) (duration time.Duration, err error)
- func RemoveDuplicates(items []string) []string
- type ArchiveInfo
- type BackupSet
- type BaseConf
- type COSConfig
- func (c *COSConfig) CheckWritePermission() error
- func (c *COSConfig) GenerateQueryParams() string
- func (c *COSConfig) GenerateURI() (res string)
- func (c *COSConfig) GenerateURIWhitoutParams() string
- func (c *COSConfig) GenerateURIWithoutSecret() (res string)
- func (c *COSConfig) GetResourceType() string
- func (c *COSConfig) NewWithObjectKey(subpath string) StorageInterface
- type DiskInfo
- type NFSConfig
- func (c *NFSConfig) CheckWritePermission() error
- func (c *NFSConfig) GenerateQueryParams() string
- func (c *NFSConfig) GenerateURI() (res string)
- func (c *NFSConfig) GenerateURIWhitoutParams() string
- func (c *NFSConfig) GenerateURIWithoutSecret() (res string)
- func (c *NFSConfig) GetResourceType() string
- func (c *NFSConfig) NewWithObjectKey(subpath string) StorageInterface
- type OSSConfig
- func (c *OSSConfig) CheckWritePermission() error
- func (c *OSSConfig) GenerateQueryParams() string
- func (c *OSSConfig) GenerateURI() (res string)
- func (c *OSSConfig) GenerateURIWhitoutParams() string
- func (c *OSSConfig) GenerateURIWithoutSecret() (res string)
- func (c *OSSConfig) GetResourceType() string
- func (c *OSSConfig) NewWithObjectKey(subpath string) StorageInterface
- type RestoreWindow
- type RestoreWindows
- type S3Config
- func (c *S3Config) CheckWritePermission() (err error)
- func (c *S3Config) GenerateQueryParams() string
- func (c *S3Config) GenerateURI() (res string)
- func (c *S3Config) GenerateURIWhitoutParams() string
- func (c *S3Config) GenerateURIWithoutSecret() (res string)
- func (c *S3Config) GetResourceType() string
- func (c *S3Config) NewWithObjectKey(subpath string) StorageInterface
- type SCN
- type StorageInterface
- type TenantKey
- type TimeUnit
Constants ¶
View Source
const ( Nanosecond time.Duration = 1 Microsecond = 1000 * Nanosecond Millisecond = 1000 * Microsecond Second = 1000 * Millisecond Minute = 60 * Second Hour = 60 * Minute Day = 24 * Hour TIME_UNIT_NANOSECOND TimeUnit = "ns" TIME_UNIT_MICROSECOND TimeUnit = "us" TIME_UNIT_MILLISECOND TimeUnit = "ms" TIME_UNIT_SECOND TimeUnit = "s" TIME_UNIT_MINUTE TimeUnit = "m" TIME_UNIT_HOUR TimeUnit = "h" TIME_UNIT_DAY TimeUnit = "d" )
Variables ¶
This section is empty.
Functions ¶
func CheckRestoreTime ¶
func ExecCommand ¶
func GetAddressList ¶
func GetAllAddressList ¶
func GetBinaryVersion ¶
func GetResourceType ¶
func IsDirEmpty ¶
func IsFileExist ¶
func ParseTimeWithRange ¶
func RemoveDuplicates ¶
Types ¶
type ArchiveInfo ¶
type ArchiveInfo struct { Key TenantKey `json:"key"` StartSCN SCN `json:"start_scn"` CheckPointSCN SCN `json:"checkpoint_scn"` }
ArchiveInfo contains the information of archive log, which only contains the key, start scn and checkpoint scn but not the display time of scn.
type BackupSet ¶
type BackupSet struct { TenantKey BackupSetID int `json:"backup_set_id"` PlusArchivelog bool `json:"plus_archivelog"` PrevFullBackupSetID int `json:"prev_full_backup_set_id"` PrevIncBackupSetID int `json:"prev_inc_backup_set_id"` StartReplaySCN SCN `json:"start_replay_scn"` MinRestoreSCN SCN `json:"min_restore_scn"` }
type COSConfig ¶
func (*COSConfig) CheckWritePermission ¶
func (*COSConfig) GenerateQueryParams ¶
func (*COSConfig) GenerateURI ¶
func (*COSConfig) GenerateURIWhitoutParams ¶
func (*COSConfig) GenerateURIWithoutSecret ¶
func (*COSConfig) GetResourceType ¶
func (*COSConfig) NewWithObjectKey ¶
func (c *COSConfig) NewWithObjectKey(subpath string) StorageInterface
type DiskInfo ¶
type DiskInfo struct { Fsid string `json:"fsid"` Path string `json:"path"` TotalSizeBytes uint64 `json:"totalSizeBytes"` // total size in bytes UsedSizeBytes uint64 `json:"usedSizeBytes"` // used size in bytes AvailableSizeBytes uint64 `json:"availableSizeBytes"` // available size in bytes FreeSizeBytes uint64 `json:"freeSizeBytes"` // free size in bytes }
func GetDiskInfo ¶
type NFSConfig ¶
type NFSConfig struct {
Path string
}
func (*NFSConfig) CheckWritePermission ¶
func (*NFSConfig) GenerateQueryParams ¶
func (*NFSConfig) GenerateURI ¶
func (*NFSConfig) GenerateURIWhitoutParams ¶
func (*NFSConfig) GenerateURIWithoutSecret ¶
func (*NFSConfig) GetResourceType ¶
func (*NFSConfig) NewWithObjectKey ¶
func (c *NFSConfig) NewWithObjectKey(subpath string) StorageInterface
type OSSConfig ¶
type OSSConfig struct {
BaseConf
}
func (*OSSConfig) CheckWritePermission ¶
func (*OSSConfig) GenerateQueryParams ¶
func (*OSSConfig) GenerateURI ¶
func (*OSSConfig) GenerateURIWhitoutParams ¶
func (*OSSConfig) GenerateURIWithoutSecret ¶
func (*OSSConfig) GetResourceType ¶
func (*OSSConfig) NewWithObjectKey ¶
func (c *OSSConfig) NewWithObjectKey(subpath string) StorageInterface
type RestoreWindow ¶
type RestoreWindows ¶
type RestoreWindows struct {
Windows []RestoreWindow `json:"restore_windows"`
}
func GetRestoreWindows ¶
func GetRestoreWindows(dataURI, logURI string) (*RestoreWindows, error)
type S3Config ¶
func (*S3Config) CheckWritePermission ¶
func (*S3Config) GenerateQueryParams ¶
func (*S3Config) GenerateURI ¶
func (*S3Config) GenerateURIWhitoutParams ¶
func (*S3Config) GenerateURIWithoutSecret ¶
func (*S3Config) GetResourceType ¶
func (*S3Config) NewWithObjectKey ¶
func (c *S3Config) NewWithObjectKey(subpath string) StorageInterface
type StorageInterface ¶
type StorageInterface interface { GenerateURI() string GenerateURIWithoutSecret() string GenerateURIWhitoutParams() string GenerateQueryParams() string GetResourceType() string CheckWritePermission() error NewWithObjectKey(string) StorageInterface }
func GetCOSStorage ¶
func GetCOSStorage(url string) (StorageInterface, error)
func GetNFSStorage ¶
func GetNFSStorage(url string) (StorageInterface, error)
func GetOSSStorage ¶
func GetOSSStorage(url string) (StorageInterface, error)
func GetS3Storage ¶
func GetS3Storage(url string) (StorageInterface, error)
func GetStorageInterfaceByURI ¶
func GetStorageInterfaceByURI(uri string) (StorageInterface, error)
Click to show internal directories.
Click to hide internal directories.