Documentation ¶
Index ¶
- Constants
- type PieceFormat
- type SeedPiece
- type SeedTask
- func (task *SeedTask) IsDone() bool
- func (task *SeedTask) IsError() bool
- func (task *SeedTask) IsFrozen() bool
- func (task *SeedTask) IsSuccess() bool
- func (task *SeedTask) IsWait() bool
- func (task *SeedTask) Log() *logger.SugaredLoggerOnWith
- func (task *SeedTask) UpdateStatus(cdnStatus string)
- func (task *SeedTask) UpdateTaskInfo(cdnStatus, realDigest, pieceMd5Sign string, ...)
- type TaskRegisterRequest
Constants ¶
View Source
const ( // TaskInfoCdnStatusWaiting captures enum value "WAITING" TaskInfoCdnStatusWaiting string = "WAITING" // TaskInfoCdnStatusRunning captures enum value "RUNNING" TaskInfoCdnStatusRunning string = "RUNNING" // TaskInfoCdnStatusFailed captures enum value "FAILED" TaskInfoCdnStatusFailed string = "FAILED" // TaskInfoCdnStatusSuccess captures enum value "SUCCESS" TaskInfoCdnStatusSuccess string = "SUCCESS" // TaskInfoCdnStatusSourceError captures enum value "SOURCE_ERROR" TaskInfoCdnStatusSourceError string = "SOURCE_ERROR" )
View Source
const (
IllegalSourceFileLen = -100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeedPiece ¶
type SeedPiece struct { PieceStyle PieceFormat `json:"piece_style"` // 0: PlainUnspecified PieceNum uint32 `json:"piece_num"` PieceMd5 string `json:"piece_md_5"` PieceRange *rangeutils.Range `json:"piece_range"` OriginRange *rangeutils.Range `json:"origin_range"` PieceLen uint32 `json:"piece_len"` }
type SeedTask ¶
type SeedTask struct { TaskID string `json:"taskId,omitempty"` URL string `json:"url,omitempty"` TaskURL string `json:"taskUrl,omitempty"` SourceFileLength int64 `json:"sourceFileLength,omitempty"` CdnFileLength int64 `json:"cdnFileLength,omitempty"` PieceSize int32 `json:"pieceSize,omitempty"` Header map[string]string `json:"header,omitempty"` CdnStatus string `json:"cdnStatus,omitempty"` PieceTotal int32 `json:"pieceTotal,omitempty"` RequestDigest string `json:"requestDigest,omitempty"` SourceRealDigest string `json:"sourceRealDigest,omitempty"` PieceMd5Sign string `json:"pieceMd5Sign,omitempty"` // contains filtered or unexported fields }
func NewSeedTask ¶
func (*SeedTask) Log ¶
func (task *SeedTask) Log() *logger.SugaredLoggerOnWith
func (*SeedTask) UpdateStatus ¶
func (*SeedTask) UpdateTaskInfo ¶
Click to show internal directories.
Click to hide internal directories.