core

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotDownload = iota
	Downloading
	Downloaded
)
View Source
const (
	Stop = iota
	StartIng
	Start
	Running
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	process.ProcInfo

	Name   string
	Status int

	SavePath string
}

type Manager

type Manager struct {
	sync.RWMutex
	SavePath string
	// contains filtered or unexported fields
}

func NewManager

func NewManager(savePath string) *Manager

func (*Manager) AddFile

func (m *Manager) AddFile(file *msg.FileData) (string, error)

func (*Manager) ListFile

func (m *Manager) ListFile() map[string]*Record

type Process

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

func NewProcess

func NewProcess(binPath string) *Process

func (*Process) AddProcess

func (p *Process) AddProcess(info *Info)

func (*Process) FindProc

func (p *Process) FindProc(name string) *Info

func (*Process) Monitor

func (p *Process) Monitor() error

func (*Process) StartProxy

func (p *Process) StartProxy(types string, name string) (int, error)

type Record

type Record struct {
	Chunk         uint32
	FileName      string
	CurrentLength uint64
	FileLength    uint64
	Sign          string //md5签名验证文件是否正常
	Status        int
}

Jump to

Keyboard shortcuts

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