Versions in this module Expand all Collapse all v0 v0.2.1 Nov 17, 2026 v0.2.0 Nov 6, 2026 Changes in this version + const MaxFileSize + const MaxMetadata + const RoutePrefix + var ErrBusy = errors.New("HTTP 接收并发已满") + var ErrCapacity = errors.New("上传暂存额度不足") + var ErrChanged = errors.New("上传暂存文件身份已变化") + var ErrClosed = errors.New("上传接收服务已停止") + var ErrExpired = errors.New("上传接收对象已过期或不存在") + var ErrInvalidToken = errors.New("上传接收凭据无效") + var ErrNotReady = errors.New("上传内容尚未完整接收") + var ErrSizeMismatch = errors.New("上传内容长度不符") + var ErrTooLarge = errors.New("上传内容超过限制") + var ErrUsed = errors.New("上传内容已固定或已提交任务") + type Lease struct + File *os.File + func (l *Lease) Close() error + type Options struct + Directory string + LockTimeout time.Duration + MaxBytes int64 + MaxFileSize int64 + MaxFiles int + MaxTransfers int + Now func() time.Time + OnCleanupError func(error) + ScanInterval time.Duration + TTL time.Duration + type Receiver struct + func (r *Receiver) Abort() (result error) + func (r *Receiver) Complete() error + func (r *Receiver) Done() <-chan struct{} + func (r *Receiver) Size() int64 + func (r *Receiver) Write(data []byte) (int, error) + type Store struct + func New(o Options) (*Store, error) + func (s *Store) BeginReceive(id, signature string) (*Receiver, error) + func (s *Store) Cancel(id string) (View, error) + func (s *Store) Claim(id, task string) (*Lease, error) + func (s *Store) Close() error + func (s *Store) Counts() (sources, receiving int) + func (s *Store) Done() <-chan struct{} + func (s *Store) Get(id string) (View, error) + func (s *Store) Reserve(size int64, metadata []byte) (View, error) + func (s *Store) SetMetadata(id string, metadata []byte) error + func (s *Store) Signature(id string) (string, error) + func (s *Store) Sweep() error + type View struct + ExpiresAt time.Time + ID string + Metadata []byte + ReadyExpiresAt *time.Time + Size int64 + State string + UploadID string