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