cdn

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is an implementation of the interface of CDNMgr.

func NewManager

func NewManager(cfg *config.Config, cacheStore *store.Store, progressManager mgr.ProgressMgr) (*Manager, error)

NewManager returns a new Manager.

func (*Manager) Delete

func (cm *Manager) Delete(ctx context.Context, taskID string) error

Delete the file from disk with specified taskID.

func (*Manager) GetHTTPPath

func (cm *Manager) GetHTTPPath(ctx context.Context, taskID string) (string, error)

GetHTTPPath returns the http download path of taskID. The returned path joined the DownloadRaw.Bucket and DownloadRaw.Key.

func (*Manager) GetStatus

func (cm *Manager) GetStatus(ctx context.Context, taskID string) (cdnStatus string, err error)

GetStatus get the status of the file.

func (*Manager) TriggerCDN

func (cm *Manager) TriggerCDN(ctx context.Context, task *types.TaskInfo) (*types.TaskInfo, error)

TriggerCDN will trigger CDN to download the file from sourceUrl.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL