mocks

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 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 Throttler

type Throttler struct {
	mock.Mock
}

Throttler is an autogenerated mock type for the Throttler type

func NewThrottler

func NewThrottler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Throttler

NewThrottler creates a new instance of Throttler. 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 (*Throttler) Add

func (_mock *Throttler) Add(key sync.Key, priority int32, creationTime time.Time)

Add provides a mock function for the type Throttler

func (*Throttler) Admit

func (_mock *Throttler) Admit(key sync.Key) bool

Admit provides a mock function for the type Throttler

func (*Throttler) EXPECT

func (_m *Throttler) EXPECT() *Throttler_Expecter

func (*Throttler) Init

func (_mock *Throttler) Init(wfs []v1alpha1.Workflow) error

Init provides a mock function for the type Throttler

func (*Throttler) Remove

func (_mock *Throttler) Remove(key sync.Key)

Remove provides a mock function for the type Throttler

func (*Throttler) ResetNamespaceParallelism

func (_mock *Throttler) ResetNamespaceParallelism(namespace string)

ResetNamespaceParallelism provides a mock function for the type Throttler

func (*Throttler) UpdateNamespaceParallelism

func (_mock *Throttler) UpdateNamespaceParallelism(namespace string, limit int)

UpdateNamespaceParallelism provides a mock function for the type Throttler

func (*Throttler) UpdateParallelism

func (_mock *Throttler) UpdateParallelism(limit int)

UpdateParallelism provides a mock function for the type Throttler

type Throttler_Add_Call

type Throttler_Add_Call struct {
	*mock.Call
}

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

func (*Throttler_Add_Call) Return

func (_c *Throttler_Add_Call) Return() *Throttler_Add_Call

func (*Throttler_Add_Call) Run

func (_c *Throttler_Add_Call) Run(run func(key sync.Key, priority int32, creationTime time.Time)) *Throttler_Add_Call

func (*Throttler_Add_Call) RunAndReturn

func (_c *Throttler_Add_Call) RunAndReturn(run func(key sync.Key, priority int32, creationTime time.Time)) *Throttler_Add_Call

type Throttler_Admit_Call

type Throttler_Admit_Call struct {
	*mock.Call
}

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

func (*Throttler_Admit_Call) Return

func (*Throttler_Admit_Call) Run

func (_c *Throttler_Admit_Call) Run(run func(key sync.Key)) *Throttler_Admit_Call

func (*Throttler_Admit_Call) RunAndReturn

func (_c *Throttler_Admit_Call) RunAndReturn(run func(key sync.Key) bool) *Throttler_Admit_Call

type Throttler_Expecter

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

func (*Throttler_Expecter) Add

func (_e *Throttler_Expecter) Add(key interface{}, priority interface{}, creationTime interface{}) *Throttler_Add_Call

Add is a helper method to define mock.On call

  • key sync.Key
  • priority int32
  • creationTime time.Time

func (*Throttler_Expecter) Admit

func (_e *Throttler_Expecter) Admit(key interface{}) *Throttler_Admit_Call

Admit is a helper method to define mock.On call

  • key sync.Key

func (*Throttler_Expecter) Init

func (_e *Throttler_Expecter) Init(wfs interface{}) *Throttler_Init_Call

Init is a helper method to define mock.On call

  • wfs []v1alpha1.Workflow

func (*Throttler_Expecter) Remove

func (_e *Throttler_Expecter) Remove(key interface{}) *Throttler_Remove_Call

Remove is a helper method to define mock.On call

  • key sync.Key

func (*Throttler_Expecter) ResetNamespaceParallelism

func (_e *Throttler_Expecter) ResetNamespaceParallelism(namespace interface{}) *Throttler_ResetNamespaceParallelism_Call

ResetNamespaceParallelism is a helper method to define mock.On call

  • namespace string

func (*Throttler_Expecter) UpdateNamespaceParallelism

func (_e *Throttler_Expecter) UpdateNamespaceParallelism(namespace interface{}, limit interface{}) *Throttler_UpdateNamespaceParallelism_Call

UpdateNamespaceParallelism is a helper method to define mock.On call

  • namespace string
  • limit int

func (*Throttler_Expecter) UpdateParallelism

func (_e *Throttler_Expecter) UpdateParallelism(limit interface{}) *Throttler_UpdateParallelism_Call

UpdateParallelism is a helper method to define mock.On call

  • limit int

type Throttler_Init_Call

type Throttler_Init_Call struct {
	*mock.Call
}

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

func (*Throttler_Init_Call) Return

func (*Throttler_Init_Call) Run

func (_c *Throttler_Init_Call) Run(run func(wfs []v1alpha1.Workflow)) *Throttler_Init_Call

func (*Throttler_Init_Call) RunAndReturn

func (_c *Throttler_Init_Call) RunAndReturn(run func(wfs []v1alpha1.Workflow) error) *Throttler_Init_Call

type Throttler_Remove_Call

type Throttler_Remove_Call struct {
	*mock.Call
}

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

func (*Throttler_Remove_Call) Return

func (*Throttler_Remove_Call) Run

func (_c *Throttler_Remove_Call) Run(run func(key sync.Key)) *Throttler_Remove_Call

func (*Throttler_Remove_Call) RunAndReturn

func (_c *Throttler_Remove_Call) RunAndReturn(run func(key sync.Key)) *Throttler_Remove_Call

type Throttler_ResetNamespaceParallelism_Call

type Throttler_ResetNamespaceParallelism_Call struct {
	*mock.Call
}

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

func (*Throttler_ResetNamespaceParallelism_Call) Return

func (*Throttler_ResetNamespaceParallelism_Call) Run

func (*Throttler_ResetNamespaceParallelism_Call) RunAndReturn

type Throttler_UpdateNamespaceParallelism_Call

type Throttler_UpdateNamespaceParallelism_Call struct {
	*mock.Call
}

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

func (*Throttler_UpdateNamespaceParallelism_Call) Return

func (*Throttler_UpdateNamespaceParallelism_Call) Run

func (*Throttler_UpdateNamespaceParallelism_Call) RunAndReturn

type Throttler_UpdateParallelism_Call

type Throttler_UpdateParallelism_Call struct {
	*mock.Call
}

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

func (*Throttler_UpdateParallelism_Call) Return

func (*Throttler_UpdateParallelism_Call) Run

func (*Throttler_UpdateParallelism_Call) RunAndReturn

func (_c *Throttler_UpdateParallelism_Call) RunAndReturn(run func(limit int)) *Throttler_UpdateParallelism_Call

Jump to

Keyboard shortcuts

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