Documentation ¶
Index ¶
- type Aria2Mock
- func (a Aria2Mock) Cancel(task *model.Download) error
- func (a Aria2Mock) CreateTask(task *model.Download, options map[string]interface{}) (string, error)
- func (a Aria2Mock) DeleteTempFile(download *model.Download) error
- func (a Aria2Mock) GetConfig() model.Aria2Option
- func (a Aria2Mock) Init() error
- func (a Aria2Mock) Select(task *model.Download, files []int) error
- func (a Aria2Mock) Status(task *model.Download) (rpc.StatusInfo, error)
- type NodeMock
- func (n NodeMock) DBModel() *model.Node
- func (n NodeMock) GetAria2Instance() common.Aria2
- func (n NodeMock) ID() uint
- func (n NodeMock) Init(node *model.Node)
- func (n NodeMock) IsActive() bool
- func (n NodeMock) IsFeatureEnabled(feature string) bool
- func (n NodeMock) IsMater() bool
- func (n NodeMock) Kill()
- func (n NodeMock) MasterAuthInstance() auth.Auth
- func (n NodeMock) Ping(req *serializer.NodePingReq) (*serializer.NodePingResp, error)
- func (n NodeMock) SlaveAuthInstance() auth.Auth
- func (n NodeMock) SubscribeStatusChange(callback func(isActive bool, id uint))
- type NodePoolMock
- type TaskPoolMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aria2Mock ¶
func (Aria2Mock) CreateTask ¶
func (Aria2Mock) GetConfig ¶
func (a Aria2Mock) GetConfig() model.Aria2Option
type NodeMock ¶
func (NodeMock) GetAria2Instance ¶
func (NodeMock) IsFeatureEnabled ¶
func (NodeMock) MasterAuthInstance ¶
func (NodeMock) Ping ¶
func (n NodeMock) Ping(req *serializer.NodePingReq) (*serializer.NodePingResp, error)
func (NodeMock) SlaveAuthInstance ¶
func (NodeMock) SubscribeStatusChange ¶
type NodePoolMock ¶
func (NodePoolMock) Add ¶
func (n NodePoolMock) Add(node *model.Node)
func (NodePoolMock) BalanceNodeByFeature ¶
func (NodePoolMock) Delete ¶
func (n NodePoolMock) Delete(id uint)
func (NodePoolMock) GetNodeByID ¶
func (n NodePoolMock) GetNodeByID(id uint) cluster.Node
type TaskPoolMock ¶
func (TaskPoolMock) Add ¶
func (t TaskPoolMock) Add(num int)
func (TaskPoolMock) Submit ¶
func (t TaskPoolMock) Submit(job task.Job)
Click to show internal directories.
Click to hide internal directories.