Documentation ¶
Index ¶
- type Downloader
- func (downloader *Downloader) DownloadPieceInfo(objectID, objectSize, start, end uint64) (pieceInfo segments, err error)
- func (downloader *Downloader) GetBucketReadQuota(ctx context.Context, req *types.GetBucketReadQuotaRequest) (*types.GetBucketReadQuotaResponse, error)
- func (downloader *Downloader) GetObject(req *types.GetObjectRequest, stream types.DownloaderService_GetObjectServer) (err error)
- func (downloader *Downloader) ListBucketReadRecord(ctx context.Context, req *types.ListBucketReadRecordRequest) (*types.ListBucketReadRecordResponse, error)
- func (downloader *Downloader) Name() string
- func (downloader *Downloader) Start(ctx context.Context) error
- func (downloader *Downloader) Stop(ctx context.Context) error
- type DownloaderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader implements the gRPC of DownloaderService, responsible for downloading object payload data
func NewDownloaderService ¶
func NewDownloaderService(cfg *DownloaderConfig) (*Downloader, error)
NewDownloaderService returns an instance of Downloader that implementation of the lifecycle.Service and DownloaderService interface
func (*Downloader) DownloadPieceInfo ¶
func (downloader *Downloader) DownloadPieceInfo(objectID, objectSize, start, end uint64) (pieceInfo segments, err error)
DownloadPieceInfo compute the piece store info for download. download interval [start, end]
func (*Downloader) GetBucketReadQuota ¶
func (downloader *Downloader) GetBucketReadQuota(ctx context.Context, req *types.GetBucketReadQuotaRequest) (*types.GetBucketReadQuotaResponse, error)
GetBucketReadQuota get the quota info of the specified month.
func (*Downloader) GetObject ¶
func (downloader *Downloader) GetObject(req *types.GetObjectRequest, stream types.DownloaderService_GetObjectServer) (err error)
GetObject downloads the payload of the object.
func (*Downloader) ListBucketReadRecord ¶
func (downloader *Downloader) ListBucketReadRecord(ctx context.Context, req *types.ListBucketReadRecordRequest) (*types.ListBucketReadRecordResponse, error)
ListBucketReadRecord get read record list of the specified time range.
func (*Downloader) Name ¶
func (downloader *Downloader) Name() string
Name return the downloader service name, for the lifecycle management
type DownloaderConfig ¶
type DownloaderConfig struct { GRPCAddress string SpDBConfig *config.SQLDBConfig PieceStoreConfig *storage.PieceStoreConfig }
DownloaderConfig defines downloader service config
Click to show internal directories.
Click to hide internal directories.