Documentation
¶
Index ¶
- Constants
- Variables
- func CreateArchive(w io.Writer, dir, baseDirName string) error
- func UploadBackup(ctx context.Context, bucket *blob.Bucket, backupsDir, prefix string, ...) (string, error)
- type Cmd
- type DialRequest
- type DialResponse
- type DialService
- type DownloadFileReq
- type DownloadType
- type Req
- type Resp
- type Service
- type StatusResp
- type UploadReq
- type UploadResp
Constants ¶
View Source
const (
DirName = "hot-backup"
)
Variables ¶
View Source
var ( ErrEmptyBackupDir = errors.New("empty backup directory") ErrMemberIDOutOfIndex = errors.New("MemberID is out of index for present backup folders") )
Functions ¶
Types ¶
type Cmd ¶
type Cmd struct {
HTTPAddress string `envconfig:"BACKUP_HTTP_ADDRESS"`
HTTPSAddress string `envconfig:"BACKUP_HTTPS_ADDRESS"`
CA string `envconfig:"BACKUP_CA"`
Cert string `envconfig:"BACKUP_CERT"`
Key string `envconfig:"BACKUP_KEY"`
}
func (*Cmd) Execute ¶
func (p *Cmd) Execute(ctx context.Context, _ *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
type DialRequest ¶
type DialRequest struct {
Endpoints []string `json:"endpoints"`
}
type DialResponse ¶
type DialService ¶ added in v0.1.15
type DialService struct{}
type DownloadFileReq ¶ added in v0.1.18
type DownloadFileReq struct {
URL string `json:"url"`
FileName string `json:"file_name"`
DestDir string `json:"dest_dir"`
SecretName string `json:"secret_name"`
DownloadType DownloadType `json:"download_type"`
}
type DownloadType ¶ added in v0.1.20
type DownloadType string
const ( BucketDownload DownloadType = "Buckets" URLDownload DownloadType = "URL" )
type Resp ¶
type Resp struct {
Backups []string `json:"backups"`
}
Resp is a backup Service backup method response
type StatusResp ¶
type StatusResp struct {
Status string `json:"status"`
Message string `json:"message,omitempty"`
BackupKey string `json:"backup_key,omitempty"`
}
StatusResp is a backup Service task status response
type UploadReq ¶
type UploadReq struct {
BucketURL string `json:"bucket_url"`
BackupBaseDir string `json:"backup_base_dir"`
HazelcastCRName string `json:"hz_cr_name"`
SecretName string `json:"secret_name"`
MemberID int `json:"member_id"`
}
UploadReq is a backup Service upload method request
type UploadResp ¶
UploadResp ia a backup Service upload method response
Click to show internal directories.
Click to hide internal directories.