Documentation ¶
Index ¶
Constants ¶
View Source
const ( CHUNK_SIZE = 1024 * 8 DEFAULT_RATE_LIMIT = 50 COMPRESS_LEVEL = 1 )
Variables ¶
This section is empty.
Functions ¶
func AddDownloadHandler ¶
func AddDownloadHandler(prefix string, app *appsrv.Application)
Types ¶
type SDownloadProvider ¶
type SDownloadProvider struct {
// contains filtered or unexported fields
}
func NewDownloadProvider ¶
func NewDownloadProvider(w http.ResponseWriter, compress, sparse bool, rateLimit int) *SDownloadProvider
type SGuestDownloadProvider ¶
type SGuestDownloadProvider struct { *SDownloadProvider // contains filtered or unexported fields }
func NewGuestDownloadProvider ¶
func NewGuestDownloadProvider( w http.ResponseWriter, compress, sparse bool, rateLimit int, sid string, ) *SGuestDownloadProvider
func (*SGuestDownloadProvider) Start ¶
func (s *SGuestDownloadProvider) Start() error
type SImageCacheDownloadProvider ¶
type SImageCacheDownloadProvider struct { *SDownloadProvider // contains filtered or unexported fields }
func NewImageCacheDownloadProvider ¶
func NewImageCacheDownloadProvider( w http.ResponseWriter, compress, sparse bool, rateLimit int, imageId string, ) *SImageCacheDownloadProvider
func (*SImageCacheDownloadProvider) HandlerHead ¶
func (s *SImageCacheDownloadProvider) HandlerHead() error
func (*SImageCacheDownloadProvider) Start ¶
func (s *SImageCacheDownloadProvider) Start() error
type SImageDownloadProvider ¶
type SImageDownloadProvider struct { *SDownloadProvider // contains filtered or unexported fields }
func NewImageDownloadProvider ¶
func NewImageDownloadProvider(w http.ResponseWriter, compress, sparse bool, rateLimit int, disk storageman.IDisk, compressFormat string) *SImageDownloadProvider
func (*SImageDownloadProvider) HandlerHead ¶
func (i *SImageDownloadProvider) HandlerHead() error
func (*SImageDownloadProvider) Start ¶
func (i *SImageDownloadProvider) Start() error
type SSnapshotDownloadProvider ¶
type SSnapshotDownloadProvider struct { *SDownloadProvider // contains filtered or unexported fields }
func NewSnapshotDownloadProvider ¶
func NewSnapshotDownloadProvider( w http.ResponseWriter, compress, sparse bool, rateLimit int, snapshotPath string, ) *SSnapshotDownloadProvider
func (*SSnapshotDownloadProvider) HandlerHead ¶
func (s *SSnapshotDownloadProvider) HandlerHead() error
func (*SSnapshotDownloadProvider) Start ¶
func (s *SSnapshotDownloadProvider) Start() error
Click to show internal directories.
Click to hide internal directories.