mocks

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aria2Mock

type Aria2Mock struct {
	testMock.Mock
}

func (Aria2Mock) Cancel

func (a Aria2Mock) Cancel(task *model.Download) error

func (Aria2Mock) CreateTask

func (a Aria2Mock) CreateTask(task *model.Download, options map[string]interface{}) (string, error)

func (Aria2Mock) DeleteTempFile

func (a Aria2Mock) DeleteTempFile(download *model.Download) error

func (Aria2Mock) GetConfig

func (a Aria2Mock) GetConfig() model.Aria2Option

func (Aria2Mock) Init

func (a Aria2Mock) Init() error

func (Aria2Mock) Select

func (a Aria2Mock) Select(task *model.Download, files []int) error

func (Aria2Mock) Status

func (a Aria2Mock) Status(task *model.Download) (rpc.StatusInfo, error)

type NodeMock

type NodeMock struct {
	testMock.Mock
}

func (NodeMock) DBModel

func (n NodeMock) DBModel() *model.Node

func (NodeMock) GetAria2Instance

func (n NodeMock) GetAria2Instance() common.Aria2

func (NodeMock) ID

func (n NodeMock) ID() uint

func (NodeMock) Init

func (n NodeMock) Init(node *model.Node)

func (NodeMock) IsActive

func (n NodeMock) IsActive() bool

func (NodeMock) IsFeatureEnabled

func (n NodeMock) IsFeatureEnabled(feature string) bool

func (NodeMock) IsMater

func (n NodeMock) IsMater() bool

func (NodeMock) Kill

func (n NodeMock) Kill()

func (NodeMock) MasterAuthInstance

func (n NodeMock) MasterAuthInstance() auth.Auth

func (NodeMock) Ping

func (NodeMock) SlaveAuthInstance

func (n NodeMock) SlaveAuthInstance() auth.Auth

func (NodeMock) SubscribeStatusChange

func (n NodeMock) SubscribeStatusChange(callback func(isActive bool, id uint))

type NodePoolMock

type NodePoolMock struct {
	testMock.Mock
}

func (NodePoolMock) Add

func (n NodePoolMock) Add(node *model.Node)

func (NodePoolMock) BalanceNodeByFeature

func (n NodePoolMock) BalanceNodeByFeature(feature string, lb balancer.Balancer) (error, cluster.Node)

func (NodePoolMock) Delete

func (n NodePoolMock) Delete(id uint)

func (NodePoolMock) GetNodeByID

func (n NodePoolMock) GetNodeByID(id uint) cluster.Node

type TaskPoolMock

type TaskPoolMock struct {
	testMock.Mock
}

func (TaskPoolMock) Add

func (t TaskPoolMock) Add(num int)

func (TaskPoolMock) Submit

func (t TaskPoolMock) Submit(job task.Job)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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