constants

package
v2.0.0-beta.9+incompat... Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Path         = "~/.qscamel"
	ConfigPath   = Path + "/qscamel.yaml"
	DatabasePath = Path + "/qscamel.db"
	LogPath      = Path + "/qscamel.log"
	PIDPath      = Path + "/qscamel.pid"
)

Path store all path related constants.

View Source
const (
	EndpointAliyun   = "aliyun"
	EndpointFs       = "fs"
	EndpointGCS      = "gcs"
	EndpointQingStor = "qingstor"
	EndpointQiniu    = "qiniu"
	EndpointS3       = "s3"
	EndpointUpyun    = "upyun"
)

Endpoint the const for all supported endpoint.

View Source
const (
	SourceEndpoint uint8 = iota
	DestinationEndpoint
)

Constants for endpoint type.

View Source
const (
	TaskTypeCopy  = "copy"
	TaskTypeFetch = "fetch"
)

Constants for task type.

View Source
const (
	TaskStatusRunning  = "running"
	TaskStatusFinished = "finished"
)

Constants for task status.

View Source
const (
	KeyTaskList   = "t"
	KeyTaskPrefix = "t:"

	KeyJobPrefix = "j:"

	KeyObjectPrefix = "o:"
)

Constants for database key.

View Source
const (
	Name             = "qscamel"
	ShortDescription = "A command line tool to migrate data"
	LongDescription  = "qscamel is a command line tool to migrate data between different endpoint efficiently."
)

Name stores all name related const.

View Source
const DefaultConfigContent = `` /* 135-byte string literal not displayed */

DefaultConfigContent is the default config config.

View Source
const Version = "2.0.0-beta.9"

Version number string.

Variables

View Source
var (
	// ErrTaskMismatch is returned when task content has been changed.
	ErrTaskMismatch = errors.New("task content mismatch")
	// ErrTaskNotFinished is returned when task is not finished.
	ErrTaskNotFinished = errors.New("task not finished")
	// ErrEndpointInvalid is returned when this endpoint is invalid.
	ErrEndpointInvalid = errors.New("endpoint is invalid")
)

These errors can be returned when handle task.

View Source
var (
	// DefaultConcurrency is default num of objects being migrated concurrently.
	DefaultConcurrency = runtime.NumCPU() * 10
)

Functions

func FormatJobKey

func FormatJobKey(u uint64) []byte

FormatJobKey will format a job key.

func FormatObjectKey

func FormatObjectKey(name string) []byte

FormatObjectKey will format a object key.

func FormatTaskKey

func FormatTaskKey(s string) []byte

FormatTaskKey will format a task key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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