Documentation
¶
Index ¶
- Constants
- func Backup(ctx context.Context, bs *tree.BackupStart, cfg *Config) error
- func BackupData(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string) error
- func CopyDir(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string) error
- func CopyFile(ctx context.Context, srcFs, dstFs fileservice.FileService, ...) error
- func SaveLaunchConfigPath(typ string, paths []string)
- func ToCsvLine2(s [][]string) (string, error)
- type Config
- type Meta
- type MetaType
- type Metas
Constants ¶
View Source
const ( TypePos = 0 SubTypePos = 1 FileNameOrDirNamePos = 2 )
Format :type,subtype,filename or dirname
View Source
const ( CnConfig = "cn" DnConfig = "dn" LogConfig = "log" ProxyConfig = "proxy" LaunchConfig = "launch" )
View Source
const (
HakeeperFile = "hk_data"
)
View Source
const (
Version = "0823"
)
Variables ¶
This section is empty.
Functions ¶
func Backup ¶
Backup Note: ctx needs to support cancel. The user can cancel the backup task by canceling the ctx.
func BackupData ¶
func BackupData(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string) error
func CopyDir ¶
func CopyDir(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string) error
func CopyFile ¶
func CopyFile(ctx context.Context, srcFs, dstFs fileservice.FileService, dentry *fileservice.DirEntry, dstDir string) error
func SaveLaunchConfigPath ¶
SaveLaunchConfigPath saves all config file paths for the standalone config
func ToCsvLine2 ¶
Types ¶
type Config ¶
type Config struct {
// Timestamp
Timestamp types.TS
// For General usage
GeneralDir fileservice.FileService
SharedFs fileservice.FileService
// For tae and hakeeper
TaeDir fileservice.FileService
// hakeeper client
HAkeeper logservice.CNHAKeeperClient
Metas *Metas
}
type Meta ¶
type Meta struct {
Typ MetaType
SubTyp string
FileNameOrDirName string
//version
Version string
//build info
Buildinfo string
//launch config
LaunchConfigFile string
}
Meta of mo_meta same as the mo_br
type Metas ¶
type Metas struct {
// contains filtered or unexported fields
}
func (*Metas) AppendBuildinfo ¶
func (*Metas) AppendLaunchconfig ¶
func (*Metas) AppendVersion ¶
Click to show internal directories.
Click to hide internal directories.