types

package
v0.2.2-test.7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UploadProgressMetaCreated     readableUploadProgressType = 0
	UploadProgressDataUploading   readableUploadProgressType = 1
	UploadProgressDataReplicating readableUploadProgressType = 2
	UploadProgressSealing         readableUploadProgressType = 3
	UploadProgressCompleted       readableUploadProgressType = 4
	UploadProgressFailed          readableUploadProgressType = 5
)

Variables

View Source
var StateToProgressType = map[TaskState]readableUploadProgressType{
	TaskState_TASK_STATE_INIT_UNSPECIFIED:       UploadProgressDataUploading,
	TaskState_TASK_STATE_UPLOAD_OBJECT_DOING:    UploadProgressDataUploading,
	TaskState_TASK_STATE_UPLOAD_OBJECT_DONE:     UploadProgressDataReplicating,
	TaskState_TASK_STATE_UPLOAD_OBJECT_ERROR:    UploadProgressFailed,
	TaskState_TASK_STATE_ALLOC_SECONDARY_DOING:  UploadProgressDataReplicating,
	TaskState_TASK_STATE_ALLOC_SECONDARY_DONE:   UploadProgressDataReplicating,
	TaskState_TASK_STATE_ALLOC_SECONDARY_ERROR:  UploadProgressFailed,
	TaskState_TASK_STATE_REPLICATE_OBJECT_DOING: UploadProgressDataReplicating,
	TaskState_TASK_STATE_REPLICATE_OBJECT_DONE:  UploadProgressDataReplicating,
	TaskState_TASK_STATE_REPLICATE_OBJECT_ERROR: UploadProgressFailed,
	TaskState_TASK_STATE_SIGN_OBJECT_DOING:      UploadProgressSealing,
	TaskState_TASK_STATE_SIGN_OBJECT_DONE:       UploadProgressSealing,
	TaskState_TASK_STATE_SIGN_OBJECT_ERROR:      UploadProgressFailed,
	TaskState_TASK_STATE_SEAL_OBJECT_DOING:      UploadProgressSealing,
	TaskState_TASK_STATE_SEAL_OBJECT_DONE:       UploadProgressCompleted,
	TaskState_TASK_STATE_SEAL_OBJECT_ERROR:      UploadProgressFailed,
}

StateToProgressType convents inner state to the readable type

View Source
var ToReadableDescription = map[readableUploadProgressType]string{
	UploadProgressMetaCreated:     "object meta is created in the chain, but the upload has been not started yet",
	UploadProgressDataUploading:   "object payload is uploading to the primary SP",
	UploadProgressDataReplicating: "object payload is replicating to the secondary SPs in the background",
	UploadProgressSealing:         "object meta is sealing onto the chain in the background",
	UploadProgressCompleted:       "object is succeed to upload",
	UploadProgressFailed:          "something is wrong in the upload progress",
}

ToReadableDescription convects readable type to the description string

Functions

func StateToDescription

func StateToDescription(state TaskState) string

StateToDescription convents state to description.

Types

This section is empty.

Jump to

Keyboard shortcuts

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