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 CopyCheckpointDir(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string, ...) ([]*taeFile, types.TS, error)
 - func CopyFile(ctx context.Context, srcFs, dstFs fileservice.FileService, name, dstDir string, ...) ([]byte, error)
 - func CopyFileWithRetry(ctx context.Context, srcFs, dstFs fileservice.FileService, name, dstDir string, ...) ([]byte, error)
 - func CopyGCDir(ctx context.Context, srcFs, dstFs fileservice.FileService, dir string, ...) ([]*taeFile, 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, config *Config) error
func CopyCheckpointDir ¶ added in v1.2.2
func CopyCheckpointDir( ctx context.Context, srcFs, dstFs fileservice.FileService, dir string, backup types.TS, ) ([]*taeFile, types.TS, error)
func CopyFile ¶
func CopyFile(ctx context.Context, srcFs, dstFs fileservice.FileService, name, dstDir string, newNames ...string) ([]byte, error)
CopyFile copy file from srcFs to dstFs and return checksum of the written file.
func CopyFileWithRetry ¶ added in v1.2.0
func CopyFileWithRetry(ctx context.Context, srcFs, dstFs fileservice.FileService, name, dstDir string, newName ...string) ([]byte, error)
func CopyGCDir ¶ added in v1.2.2
func CopyGCDir( ctx context.Context, srcFs, dstFs fileservice.FileService, dir string, backup, min types.TS, ) ([]*taeFile, 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
	// For parallel backup
	Parallelism uint16
	BackupType string
	BackupTs   types.TS
}
    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.