snapshot

package
v0.0.0-...-46d4b59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version         = "0.0.6"
	TypeCloneTask   = "0"
	TypeRecoverTask = "1"

	QueryAction      = "Action"
	QueryVersion     = "Version"
	QueryUser        = "User"
	QueryUUID        = "UUID"
	QuerySource      = "Source"
	QueryDestination = "Destination"
	QueryLimit       = "Limit"
	QueryOffset      = "Offset"
	QueryStatus      = "Status"
	QueryType        = "Type"
	QueryFile        = "File"
	QueryName        = "Name"

	ActionClone               = "Clone"
	ActionRecover             = "Recover"
	ActionFlatten             = "Flatten"
	ActionCreateSnapshot      = "CreateSnapshot"
	ActionDeleteSnapshot      = "DeleteSnapshot"
	ActionCancelSnapshot      = "CancelSnapshot"
	ActionCleanCloneTask      = "CleanCloneTask"
	ActionGetCloneTaskList    = "GetCloneTaskList"
	ActionGetFileSnapshotList = "GetFileSnapshotList"
	ActionGetFileSnapshotInfo = "GetFileSnapshotInfo"

	ResultCode    = "Code"
	ResultSuccess = "0"
	Limit         = "100"
	Offset        = "0"

	ErrSnaphshot  = "5"
	DefaultSnapID = "*"
)

Variables

View Source
var CloneStep = []string{"CreateCloneFile", "CreateCloneMeta", "CreateCloneChunk", "CompleteCloneMeta", "RecoverChunk", "ChangeOwner", "RenameCloneFile", "CompleteCloneFile", "End"}
View Source
var FileType = []string{"file", "snapshot"}
View Source
var SnapshotStatus = []string{"done", "in-progress", "deleting", "errorDeleting", "canceling", "error"}
View Source
var TaskStatus = []string{"Done", "Cloning", "Recovering", "Cleaning", "ErrorCleaning", "Error", "Retrying", "MetaInstalled"}
View Source
var TaskType = []string{"clone", "recover"}

Functions

func NewQuerySubUri

func NewQuerySubUri(params map[string]any) string

Types

type Response

type Response struct {
	Code      string `json:"Code"`
	Message   string `json:"Message"`
	RequestId string `json:"RequestId"`
}

type SnapshotInfo

type SnapshotInfo struct {
	File       string  `json:"File"`
	FileLength int     `json:"FileLength"`
	Name       string  `json:"Name"`
	Progress   float64 `json:"Progress"`
	SeqNum     int     `json:"SeqNum"`
	Status     int     `json:"status"`
	Time       int64   `json:"Time"`
	UUID       string  `json:"UUID"`
	User       string  `json:"User"`
}

type SnapshotInfos

type SnapshotInfos []SnapshotInfo

type TaskInfo

type TaskInfo struct {
	File       string  `json:"File"`
	FileType   int     `json:"FileType"`
	IsLazy     bool    `json:"IsLazy"`
	NextStep   int     `json:"NextStep"`
	Progress   float64 `json:"Progress"`
	Src        string  `json:"Src"`
	TaskStatus int     `json:"TaskStatus"`
	TaskType   int     `json:"TaskType"`
	Time       int64   `json:"Time"`
	UUID       string  `json:"UUID"`
	User       string  `json:"User"`
}

type TaskInfos

type TaskInfos []TaskInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL