Documentation ¶
Index ¶
- type Downloader
- 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) SplitToSegmentPieceInfos(objectID, objectSize, start, end uint64) (pieceInfos []*segmentPieceInfo, err error)
- 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) 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
func (*Downloader) SplitToSegmentPieceInfos ¶ added in v0.1.1
func (downloader *Downloader) SplitToSegmentPieceInfos(objectID, objectSize, start, end uint64) (pieceInfos []*segmentPieceInfo, err error)
SplitToSegmentPieceInfos compute the piece store info for get object, object data range [start, end].
type DownloaderConfig ¶
type DownloaderConfig struct { GRPCAddress string SpDBConfig *config.SQLDBConfig PieceStoreConfig *storage.PieceStoreConfig }
DownloaderConfig defines downloader service config