Documentation ¶
Index ¶
- func CheckAndCleanBackups(backupPrefix, backupDir string, retentionTime, backupCycleTime int, ...) (bool, error)
- func GetBackupFileName(backupPrefix string, now time.Time) string
- func GetPid(path string) (int, error)
- func ReadFile(path string) ([]byte, error)
- func RemoveFiles(files []string) error
- func SortInsertInt(slice []int, ints ...int) []int
- func SortInsertUniqInt(slice []int, ints ...int) []int
- func TarGZ(dest string, filenames []string) (err error)
- type ConfigFingerprinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndCleanBackups ¶ added in v1.0.5
func CheckAndCleanBackups( backupPrefix, backupDir string, retentionTime, backupCycleTime int, now time.Time, ) (bool, error)
CheckAndCleanBackups 检查归档目录下归档文件是否需要清理及是否可以进行归档操作的函数
参数:
backupPrefix: 归档文件前缀名 backupDir: 归档文件目录路径 retentionTime: 归档文件保存时间,单位天 backupCycleTime: 归档操作周期,单位天 now: 当前检查时间
返回值:
true: 需要归档操作; false: 不需要归档 错误
func GetBackupFileName ¶ added in v1.0.5
func RemoveFiles ¶
func SortInsertInt ¶
func SortInsertUniqInt ¶
Types ¶
type ConfigFingerprinter ¶
type ConfigFingerprinter interface { Diff(fingerprinter ConfigFingerprinter) bool Renew(fingerprinter ConfigFingerprinter) }
func NewConfigFingerprinter ¶
func NewConfigFingerprinter(dataMap map[string][]byte) ConfigFingerprinter
Click to show internal directories.
Click to hide internal directories.