gc

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 12 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 DfgetTaskMgr.

func NewManager

func NewManager(cfg *config.Config, taskMgr mgr.TaskMgr, peerMgr mgr.PeerMgr, dfgetTaskMgr mgr.DfgetTaskMgr,
	progressMgr mgr.ProgressMgr, cdnMgr mgr.CDNMgr, register prometheus.Registerer) (*Manager, error)

NewManager returns a new Manager.

func (*Manager) GCPeer

func (gcm *Manager) GCPeer(ctx context.Context, peerID string)

GCPeer is used to do the gc job when a peer offline.

func (*Manager) GCTask

func (gcm *Manager) GCTask(ctx context.Context, taskID string, full bool)

GCTask is used to do the gc job with specified taskID.

func (*Manager) StartGC

func (gcm *Manager) StartGC(ctx context.Context)

StartGC starts to do the gc jobs.

Jump to

Keyboard shortcuts

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