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[JobState]readableUploadProgressType{ JobState_JOB_STATE_INIT_UNSPECIFIED: UploadProgressDataUploading, JobState_JOB_STATE_UPLOAD_OBJECT_DOING: UploadProgressDataUploading, JobState_JOB_STATE_UPLOAD_OBJECT_DONE: UploadProgressDataReplicating, JobState_JOB_STATE_UPLOAD_OBJECT_ERROR: UploadProgressFailed, JobState_JOB_STATE_ALLOC_SECONDARY_DOING: UploadProgressDataReplicating, JobState_JOB_STATE_ALLOC_SECONDARY_DONE: UploadProgressDataReplicating, JobState_JOB_STATE_ALLOC_SECONDARY_ERROR: UploadProgressFailed, JobState_JOB_STATE_REPLICATE_OBJECT_DOING: UploadProgressDataReplicating, JobState_JOB_STATE_REPLICATE_OBJECT_DONE: UploadProgressDataReplicating, JobState_JOB_STATE_REPLICATE_OBJECT_ERROR: UploadProgressFailed, JobState_JOB_STATE_SIGN_OBJECT_DOING: UploadProgressSealing, JobState_JOB_STATE_SIGN_OBJECT_DONE: UploadProgressSealing, JobState_JOB_STATE_SIGN_OBJECT_ERROR: UploadProgressFailed, JobState_JOB_STATE_SEAL_OBJECT_DOING: UploadProgressSealing, JobState_JOB_STATE_SEAL_OBJECT_DONE: UploadProgressCompleted, JobState_JOB_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 process", }
ToReadableDescription convects readable type to the description string
Functions ¶
func StateToDescription ¶
func StateToDescription(state JobState) string
StateToDescription convents state to description.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.