Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
feature: Add an empty implementation of the CDN manager
Browse files Browse the repository at this point in the history
Signed-off-by: Starnop <starnop@163.com>
  • Loading branch information
starnop committed Apr 4, 2019
1 parent 95d611d commit 5b226ec
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion supernode/daemon/mgr/cdn_mgr.go
Expand Up @@ -19,6 +19,29 @@ type CDNMgr interface {
// GetStatus get the status of the file.
GetStatus(ctx context.Context, taskID string) (cdnStatus string, err error)

// Delete delete the file from disk with specified taskID.
// Delete the file from disk with specified taskID.
Delete(ctx context.Context, taskID string) error
}

// CDNManager is an implementation of the interface of CDNMgr.
type CDNManager struct{}

// NewCDNManager returns a new CDNManager.
func NewCDNManager() (*CDNManager, error) {
return &CDNManager{}, nil
}

// TriggerCDN will trigger CDN to download the file from sourceUrl.
func (cm *CDNManager) TriggerCDN(ctx context.Context, taskInfo *types.TaskInfo) error {
return nil
}

// GetStatus get the status of the file.
func (cm *CDNManager) GetStatus(ctx context.Context, taskID string) (cdnStatus string, err error) {
return "", nil
}

// Delete the file from disk with specified taskID.
func (cm *CDNManager) Delete(ctx context.Context, taskID string) error {
return nil
}

0 comments on commit 5b226ec

Please sign in to comment.