queue

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: Apache-2.0, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFilterFn

type MockFilterFn struct {
	mock.Mock
}

MockFilterFn is an autogenerated mock type for the FilterFn type

func NewMockFilterFn

func NewMockFilterFn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFilterFn

NewMockFilterFn creates a new instance of MockFilterFn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockFilterFn) EXPECT

func (_m *MockFilterFn) EXPECT() *MockFilterFn_Expecter

func (*MockFilterFn) Execute

func (_m *MockFilterFn) Execute(_a0 *model.Task) (bool, int)

Execute provides a mock function with given fields: _a0

type MockFilterFn_Execute_Call

type MockFilterFn_Execute_Call struct {
	*mock.Call
}

MockFilterFn_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*MockFilterFn_Execute_Call) Return

func (*MockFilterFn_Execute_Call) Run

func (*MockFilterFn_Execute_Call) RunAndReturn

func (_c *MockFilterFn_Execute_Call) RunAndReturn(run func(*model.Task) (bool, int)) *MockFilterFn_Execute_Call

type MockFilterFn_Expecter

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

func (*MockFilterFn_Expecter) Execute

func (_e *MockFilterFn_Expecter) Execute(_a0 interface{}) *MockFilterFn_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 *model.Task

type MockQueue

type MockQueue struct {
	mock.Mock
}

MockQueue is an autogenerated mock type for the Queue type

func NewMockQueue

func NewMockQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockQueue

NewMockQueue creates a new instance of MockQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockQueue) Done

func (_mock *MockQueue) Done(c context.Context, id string, exitStatus model.StatusValue) error

Done provides a mock function for the type MockQueue

func (*MockQueue) EXPECT

func (_m *MockQueue) EXPECT() *MockQueue_Expecter

func (*MockQueue) Error

func (_mock *MockQueue) Error(c context.Context, id string, err error) error

Error provides a mock function for the type MockQueue

func (*MockQueue) ErrorAtOnce

func (_mock *MockQueue) ErrorAtOnce(c context.Context, ids []string, err error) error

ErrorAtOnce provides a mock function for the type MockQueue

func (*MockQueue) Evict

func (_mock *MockQueue) Evict(c context.Context, id string) error

Evict provides a mock function for the type MockQueue

func (*MockQueue) EvictAtOnce

func (_mock *MockQueue) EvictAtOnce(c context.Context, ids []string) error

EvictAtOnce provides a mock function for the type MockQueue

func (*MockQueue) Extend

func (_mock *MockQueue) Extend(c context.Context, agentID int64, workflowID string) error

Extend provides a mock function for the type MockQueue

func (*MockQueue) Info

func (_mock *MockQueue) Info(c context.Context) queue.InfoT

Info provides a mock function for the type MockQueue

func (*MockQueue) KickAgentWorkers

func (_mock *MockQueue) KickAgentWorkers(agentID int64)

KickAgentWorkers provides a mock function for the type MockQueue

func (*MockQueue) Pause

func (_mock *MockQueue) Pause()

Pause provides a mock function for the type MockQueue

func (*MockQueue) Poll

func (_mock *MockQueue) Poll(c context.Context, agentID int64, f queue.FilterFn) (*model.Task, error)

Poll provides a mock function for the type MockQueue

func (*MockQueue) Push

func (_mock *MockQueue) Push(c context.Context, task *model.Task) error

Push provides a mock function for the type MockQueue

func (*MockQueue) PushAtOnce

func (_mock *MockQueue) PushAtOnce(c context.Context, tasks []*model.Task) error

PushAtOnce provides a mock function for the type MockQueue

func (*MockQueue) Resume

func (_mock *MockQueue) Resume()

Resume provides a mock function for the type MockQueue

func (*MockQueue) Wait

func (_mock *MockQueue) Wait(c context.Context, id string) error

Wait provides a mock function for the type MockQueue

type MockQueue_Done_Call

type MockQueue_Done_Call struct {
	*mock.Call
}

MockQueue_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done'

func (*MockQueue_Done_Call) Return

func (*MockQueue_Done_Call) Run

func (_c *MockQueue_Done_Call) Run(run func(c context.Context, id string, exitStatus model.StatusValue)) *MockQueue_Done_Call

func (*MockQueue_Done_Call) RunAndReturn

func (_c *MockQueue_Done_Call) RunAndReturn(run func(c context.Context, id string, exitStatus model.StatusValue) error) *MockQueue_Done_Call

type MockQueue_ErrorAtOnce_Call

type MockQueue_ErrorAtOnce_Call struct {
	*mock.Call
}

MockQueue_ErrorAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ErrorAtOnce'

func (*MockQueue_ErrorAtOnce_Call) Return

func (*MockQueue_ErrorAtOnce_Call) Run

func (*MockQueue_ErrorAtOnce_Call) RunAndReturn

func (_c *MockQueue_ErrorAtOnce_Call) RunAndReturn(run func(c context.Context, ids []string, err error) error) *MockQueue_ErrorAtOnce_Call

type MockQueue_Error_Call

type MockQueue_Error_Call struct {
	*mock.Call
}

MockQueue_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error'

func (*MockQueue_Error_Call) Return

func (*MockQueue_Error_Call) Run

func (_c *MockQueue_Error_Call) Run(run func(c context.Context, id string, err error)) *MockQueue_Error_Call

func (*MockQueue_Error_Call) RunAndReturn

func (_c *MockQueue_Error_Call) RunAndReturn(run func(c context.Context, id string, err error) error) *MockQueue_Error_Call

type MockQueue_EvictAtOnce_Call

type MockQueue_EvictAtOnce_Call struct {
	*mock.Call
}

MockQueue_EvictAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EvictAtOnce'

func (*MockQueue_EvictAtOnce_Call) Return

func (*MockQueue_EvictAtOnce_Call) Run

func (*MockQueue_EvictAtOnce_Call) RunAndReturn

func (_c *MockQueue_EvictAtOnce_Call) RunAndReturn(run func(c context.Context, ids []string) error) *MockQueue_EvictAtOnce_Call

type MockQueue_Evict_Call

type MockQueue_Evict_Call struct {
	*mock.Call
}

MockQueue_Evict_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Evict'

func (*MockQueue_Evict_Call) Return

func (*MockQueue_Evict_Call) Run

func (*MockQueue_Evict_Call) RunAndReturn

func (_c *MockQueue_Evict_Call) RunAndReturn(run func(c context.Context, id string) error) *MockQueue_Evict_Call

type MockQueue_Expecter

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

func (*MockQueue_Expecter) Done

func (_e *MockQueue_Expecter) Done(c interface{}, id interface{}, exitStatus interface{}) *MockQueue_Done_Call

Done is a helper method to define mock.On call

  • c
  • id
  • exitStatus

func (*MockQueue_Expecter) Error

func (_e *MockQueue_Expecter) Error(c interface{}, id interface{}, err interface{}) *MockQueue_Error_Call

Error is a helper method to define mock.On call

  • c
  • id
  • err

func (*MockQueue_Expecter) ErrorAtOnce

func (_e *MockQueue_Expecter) ErrorAtOnce(c interface{}, ids interface{}, err interface{}) *MockQueue_ErrorAtOnce_Call

ErrorAtOnce is a helper method to define mock.On call

  • c
  • ids
  • err

func (*MockQueue_Expecter) Evict

func (_e *MockQueue_Expecter) Evict(c interface{}, id interface{}) *MockQueue_Evict_Call

Evict is a helper method to define mock.On call

  • c
  • id

func (*MockQueue_Expecter) EvictAtOnce

func (_e *MockQueue_Expecter) EvictAtOnce(c interface{}, ids interface{}) *MockQueue_EvictAtOnce_Call

EvictAtOnce is a helper method to define mock.On call

  • c
  • ids

func (*MockQueue_Expecter) Extend

func (_e *MockQueue_Expecter) Extend(c interface{}, agentID interface{}, workflowID interface{}) *MockQueue_Extend_Call

Extend is a helper method to define mock.On call

  • c
  • agentID
  • workflowID

func (*MockQueue_Expecter) Info

func (_e *MockQueue_Expecter) Info(c interface{}) *MockQueue_Info_Call

Info is a helper method to define mock.On call

  • c

func (*MockQueue_Expecter) KickAgentWorkers

func (_e *MockQueue_Expecter) KickAgentWorkers(agentID interface{}) *MockQueue_KickAgentWorkers_Call

KickAgentWorkers is a helper method to define mock.On call

  • agentID

func (*MockQueue_Expecter) Pause

Pause is a helper method to define mock.On call

func (*MockQueue_Expecter) Poll

func (_e *MockQueue_Expecter) Poll(c interface{}, agentID interface{}, f interface{}) *MockQueue_Poll_Call

Poll is a helper method to define mock.On call

  • c
  • agentID
  • f

func (*MockQueue_Expecter) Push

func (_e *MockQueue_Expecter) Push(c interface{}, task interface{}) *MockQueue_Push_Call

Push is a helper method to define mock.On call

  • c
  • task

func (*MockQueue_Expecter) PushAtOnce

func (_e *MockQueue_Expecter) PushAtOnce(c interface{}, tasks interface{}) *MockQueue_PushAtOnce_Call

PushAtOnce is a helper method to define mock.On call

  • c
  • tasks

func (*MockQueue_Expecter) Resume

Resume is a helper method to define mock.On call

func (*MockQueue_Expecter) Wait

func (_e *MockQueue_Expecter) Wait(c interface{}, id interface{}) *MockQueue_Wait_Call

Wait is a helper method to define mock.On call

  • c
  • id

type MockQueue_Extend_Call

type MockQueue_Extend_Call struct {
	*mock.Call
}

MockQueue_Extend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extend'

func (*MockQueue_Extend_Call) Return

func (*MockQueue_Extend_Call) Run

func (_c *MockQueue_Extend_Call) Run(run func(c context.Context, agentID int64, workflowID string)) *MockQueue_Extend_Call

func (*MockQueue_Extend_Call) RunAndReturn

func (_c *MockQueue_Extend_Call) RunAndReturn(run func(c context.Context, agentID int64, workflowID string) error) *MockQueue_Extend_Call

type MockQueue_Info_Call

type MockQueue_Info_Call struct {
	*mock.Call
}

MockQueue_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'

func (*MockQueue_Info_Call) Return

func (*MockQueue_Info_Call) Run

func (*MockQueue_Info_Call) RunAndReturn

func (_c *MockQueue_Info_Call) RunAndReturn(run func(c context.Context) queue.InfoT) *MockQueue_Info_Call

type MockQueue_KickAgentWorkers_Call

type MockQueue_KickAgentWorkers_Call struct {
	*mock.Call
}

MockQueue_KickAgentWorkers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KickAgentWorkers'

func (*MockQueue_KickAgentWorkers_Call) Return

func (*MockQueue_KickAgentWorkers_Call) Run

func (*MockQueue_KickAgentWorkers_Call) RunAndReturn

func (_c *MockQueue_KickAgentWorkers_Call) RunAndReturn(run func(agentID int64)) *MockQueue_KickAgentWorkers_Call

type MockQueue_Pause_Call

type MockQueue_Pause_Call struct {
	*mock.Call
}

MockQueue_Pause_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pause'

func (*MockQueue_Pause_Call) Return

func (*MockQueue_Pause_Call) Run

func (_c *MockQueue_Pause_Call) Run(run func()) *MockQueue_Pause_Call

func (*MockQueue_Pause_Call) RunAndReturn

func (_c *MockQueue_Pause_Call) RunAndReturn(run func()) *MockQueue_Pause_Call

type MockQueue_Poll_Call

type MockQueue_Poll_Call struct {
	*mock.Call
}

MockQueue_Poll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Poll'

func (*MockQueue_Poll_Call) Return

func (_c *MockQueue_Poll_Call) Return(task *model.Task, err error) *MockQueue_Poll_Call

func (*MockQueue_Poll_Call) Run

func (_c *MockQueue_Poll_Call) Run(run func(c context.Context, agentID int64, f queue.FilterFn)) *MockQueue_Poll_Call

func (*MockQueue_Poll_Call) RunAndReturn

func (_c *MockQueue_Poll_Call) RunAndReturn(run func(c context.Context, agentID int64, f queue.FilterFn) (*model.Task, error)) *MockQueue_Poll_Call

type MockQueue_PushAtOnce_Call

type MockQueue_PushAtOnce_Call struct {
	*mock.Call
}

MockQueue_PushAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushAtOnce'

func (*MockQueue_PushAtOnce_Call) Return

func (*MockQueue_PushAtOnce_Call) Run

func (*MockQueue_PushAtOnce_Call) RunAndReturn

func (_c *MockQueue_PushAtOnce_Call) RunAndReturn(run func(c context.Context, tasks []*model.Task) error) *MockQueue_PushAtOnce_Call

type MockQueue_Push_Call

type MockQueue_Push_Call struct {
	*mock.Call
}

MockQueue_Push_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Push'

func (*MockQueue_Push_Call) Return

func (*MockQueue_Push_Call) Run

func (_c *MockQueue_Push_Call) Run(run func(c context.Context, task *model.Task)) *MockQueue_Push_Call

func (*MockQueue_Push_Call) RunAndReturn

func (_c *MockQueue_Push_Call) RunAndReturn(run func(c context.Context, task *model.Task) error) *MockQueue_Push_Call

type MockQueue_Resume_Call

type MockQueue_Resume_Call struct {
	*mock.Call
}

MockQueue_Resume_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resume'

func (*MockQueue_Resume_Call) Return

func (*MockQueue_Resume_Call) Run

func (_c *MockQueue_Resume_Call) Run(run func()) *MockQueue_Resume_Call

func (*MockQueue_Resume_Call) RunAndReturn

func (_c *MockQueue_Resume_Call) RunAndReturn(run func()) *MockQueue_Resume_Call

type MockQueue_Wait_Call

type MockQueue_Wait_Call struct {
	*mock.Call
}

MockQueue_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait'

func (*MockQueue_Wait_Call) Return

func (*MockQueue_Wait_Call) Run

func (_c *MockQueue_Wait_Call) Run(run func(c context.Context, id string)) *MockQueue_Wait_Call

func (*MockQueue_Wait_Call) RunAndReturn

func (_c *MockQueue_Wait_Call) RunAndReturn(run func(c context.Context, id string) error) *MockQueue_Wait_Call

Jump to

Keyboard shortcuts

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