task

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCancelFlag

type MockCancelFlag struct {
	mock.Mock
}

MockCancelFlag mocks a cancel flag.

func NewMockDefault

func NewMockDefault() *MockCancelFlag

NewMockDefault returns a mocked cancel flag.

func (*MockCancelFlag) Canceled

func (flag *MockCancelFlag) Canceled() bool

Canceled mocks the method with the same name.

func (*MockCancelFlag) Set

func (flag *MockCancelFlag) Set(state task.State)

func (*MockCancelFlag) ShutDown

func (flag *MockCancelFlag) ShutDown() bool

ShutDown mocks the method with the same name.

func (*MockCancelFlag) State

func (flag *MockCancelFlag) State() task.State

func (*MockCancelFlag) Wait

func (flag *MockCancelFlag) Wait() (state task.State)

Wait mocks the method with the same name.

type MockedPool

type MockedPool struct {
	mock.Mock
}

MockedPool stands for a mock pool.

func (*MockedPool) AcquireBufferToken

func (mockPool *MockedPool) AcquireBufferToken(jobId string) task.PoolErrorCode

AcquireBufferToken provides a mock function with given fields:

func (*MockedPool) BufferTokensIssued

func (mockPool *MockedPool) BufferTokensIssued() int

BufferTokensIssued mocks the method with the same name.

func (*MockedPool) Cancel

func (mockPool *MockedPool) Cancel(jobID string) bool

Cancel mocks the method with the same name.

func (*MockedPool) HasJob

func (mockPool *MockedPool) HasJob(jobID string) bool

HasJob mocks the method with the same name.

func (*MockedPool) ReleaseBufferToken

func (mockPool *MockedPool) ReleaseBufferToken(jobId string) task.PoolErrorCode

ReleaseBufferToken provides a mock function with given fields:

func (*MockedPool) Shutdown

func (mockPool *MockedPool) Shutdown()

Shutdown mocks the method with the same name.

func (*MockedPool) ShutdownAndWait

func (mockPool *MockedPool) ShutdownAndWait(timeout time.Duration) (finished bool)

ShutdownAndWait mocks the method with the same name.

func (*MockedPool) Submit

func (mockPool *MockedPool) Submit(log log.T, jobID string, job task.Job) error

Submit mocks the method with the same name.

Jump to

Keyboard shortcuts

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