mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. 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 (*Manager) AddNode

func (_mock *Manager) AddNode(context1 context.Context, s string, resources types.Resources, info *types0.Info) (types.Resources, error)

AddNode provides a mock function for the type Manager

func (*Manager) Alloc

func (_mock *Manager) Alloc(context1 context.Context, s string, n int, resources types.Resources) ([]types.Resources, []types.Resources, error)

Alloc provides a mock function for the type Manager

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) GetMetricsDescription

func (_mock *Manager) GetMetricsDescription(context1 context.Context) ([]*types1.MetricsDescription, error)

GetMetricsDescription provides a mock function for the type Manager

func (*Manager) GetMostIdleNode

func (_mock *Manager) GetMostIdleNode(context1 context.Context, strings []string) (string, error)

GetMostIdleNode provides a mock function for the type Manager

func (*Manager) GetNodeResourceInfo

func (_mock *Manager) GetNodeResourceInfo(context1 context.Context, s string, workloads []*types2.Workload, b bool) (types.Resources, types.Resources, []string, error)

GetNodeResourceInfo provides a mock function for the type Manager

func (*Manager) GetNodesDeployCapacity

func (_mock *Manager) GetNodesDeployCapacity(context1 context.Context, strings []string, resources types.Resources) (map[string]*types1.NodeDeployCapacity, int, error)

GetNodesDeployCapacity provides a mock function for the type Manager

func (*Manager) GetNodesMetrics added in v0.1.4

func (_mock *Manager) GetNodesMetrics(context1 context.Context, nodes []*types2.Node) ([]*types1.Metrics, error)

GetNodesMetrics provides a mock function for the type Manager

func (*Manager) Realloc

func (_mock *Manager) Realloc(context1 context.Context, s string, resources types.Resources, resources1 types.Resources) (types.Resources, types.Resources, types.Resources, error)

Realloc provides a mock function for the type Manager

func (*Manager) Remap

func (_mock *Manager) Remap(context1 context.Context, s string, workloads []*types2.Workload) (map[string]types.Resources, error)

Remap provides a mock function for the type Manager

func (*Manager) RemoveNode

func (_mock *Manager) RemoveNode(context1 context.Context, s string) error

RemoveNode provides a mock function for the type Manager

func (*Manager) RollbackAlloc

func (_mock *Manager) RollbackAlloc(context1 context.Context, s string, resourcess []types.Resources) error

RollbackAlloc provides a mock function for the type Manager

func (*Manager) RollbackRealloc

func (_mock *Manager) RollbackRealloc(context1 context.Context, s string, resources types.Resources) error

RollbackRealloc provides a mock function for the type Manager

func (*Manager) SetNodeResourceCapacity

func (_mock *Manager) SetNodeResourceCapacity(context1 context.Context, s string, resources types.Resources, resources1 types.Resources, b bool, b1 bool) (types.Resources, types.Resources, error)

SetNodeResourceCapacity provides a mock function for the type Manager

func (*Manager) SetNodeResourceUsage

func (_mock *Manager) SetNodeResourceUsage(context1 context.Context, s string, resources types.Resources, resources1 types.Resources, resourcess []types.Resources, b bool, b1 bool) (types.Resources, types.Resources, error)

SetNodeResourceUsage provides a mock function for the type Manager

type Manager_AddNode_Call

type Manager_AddNode_Call struct {
	*mock.Call
}

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

func (*Manager_AddNode_Call) Return

func (_c *Manager_AddNode_Call) Return(resources1 types.Resources, err error) *Manager_AddNode_Call

func (*Manager_AddNode_Call) Run

func (_c *Manager_AddNode_Call) Run(run func(context1 context.Context, s string, resources types.Resources, info *types0.Info)) *Manager_AddNode_Call

func (*Manager_AddNode_Call) RunAndReturn

func (_c *Manager_AddNode_Call) RunAndReturn(run func(context1 context.Context, s string, resources types.Resources, info *types0.Info) (types.Resources, error)) *Manager_AddNode_Call

type Manager_Alloc_Call

type Manager_Alloc_Call struct {
	*mock.Call
}

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

func (*Manager_Alloc_Call) Return

func (_c *Manager_Alloc_Call) Return(resourcess []types.Resources, resourcess1 []types.Resources, err error) *Manager_Alloc_Call

func (*Manager_Alloc_Call) Run

func (_c *Manager_Alloc_Call) Run(run func(context1 context.Context, s string, n int, resources types.Resources)) *Manager_Alloc_Call

func (*Manager_Alloc_Call) RunAndReturn

func (_c *Manager_Alloc_Call) RunAndReturn(run func(context1 context.Context, s string, n int, resources types.Resources) ([]types.Resources, []types.Resources, error)) *Manager_Alloc_Call

type Manager_Expecter

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

func (*Manager_Expecter) AddNode

func (_e *Manager_Expecter) AddNode(context1 any, s any, resources any, info any) *Manager_AddNode_Call

AddNode is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resources types.Resources
  • info *types0.Info

func (*Manager_Expecter) Alloc

func (_e *Manager_Expecter) Alloc(context1 any, s any, n any, resources any) *Manager_Alloc_Call

Alloc is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • n int
  • resources types.Resources

func (*Manager_Expecter) GetMetricsDescription

func (_e *Manager_Expecter) GetMetricsDescription(context1 any) *Manager_GetMetricsDescription_Call

GetMetricsDescription is a helper method to define mock.On call

  • context1 context.Context

func (*Manager_Expecter) GetMostIdleNode

func (_e *Manager_Expecter) GetMostIdleNode(context1 any, strings any) *Manager_GetMostIdleNode_Call

GetMostIdleNode is a helper method to define mock.On call

  • context1 context.Context
  • strings []string

func (*Manager_Expecter) GetNodeResourceInfo

func (_e *Manager_Expecter) GetNodeResourceInfo(context1 any, s any, workloads any, b any) *Manager_GetNodeResourceInfo_Call

GetNodeResourceInfo is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • workloads []*types2.Workload
  • b bool

func (*Manager_Expecter) GetNodesDeployCapacity

func (_e *Manager_Expecter) GetNodesDeployCapacity(context1 any, strings any, resources any) *Manager_GetNodesDeployCapacity_Call

GetNodesDeployCapacity is a helper method to define mock.On call

  • context1 context.Context
  • strings []string
  • resources types.Resources

func (*Manager_Expecter) GetNodesMetrics added in v0.1.4

func (_e *Manager_Expecter) GetNodesMetrics(context1 any, nodes any) *Manager_GetNodesMetrics_Call

GetNodesMetrics is a helper method to define mock.On call

  • context1 context.Context
  • nodes []*types2.Node

func (*Manager_Expecter) Realloc

func (_e *Manager_Expecter) Realloc(context1 any, s any, resources any, resources1 any) *Manager_Realloc_Call

Realloc is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resources types.Resources
  • resources1 types.Resources

func (*Manager_Expecter) Remap

func (_e *Manager_Expecter) Remap(context1 any, s any, workloads any) *Manager_Remap_Call

Remap is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • workloads []*types2.Workload

func (*Manager_Expecter) RemoveNode

func (_e *Manager_Expecter) RemoveNode(context1 any, s any) *Manager_RemoveNode_Call

RemoveNode is a helper method to define mock.On call

  • context1 context.Context
  • s string

func (*Manager_Expecter) RollbackAlloc

func (_e *Manager_Expecter) RollbackAlloc(context1 any, s any, resourcess any) *Manager_RollbackAlloc_Call

RollbackAlloc is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resourcess []types.Resources

func (*Manager_Expecter) RollbackRealloc

func (_e *Manager_Expecter) RollbackRealloc(context1 any, s any, resources any) *Manager_RollbackRealloc_Call

RollbackRealloc is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resources types.Resources

func (*Manager_Expecter) SetNodeResourceCapacity

func (_e *Manager_Expecter) SetNodeResourceCapacity(context1 any, s any, resources any, resources1 any, b any, b1 any) *Manager_SetNodeResourceCapacity_Call

SetNodeResourceCapacity is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resources types.Resources
  • resources1 types.Resources
  • b bool
  • b1 bool

func (*Manager_Expecter) SetNodeResourceUsage

func (_e *Manager_Expecter) SetNodeResourceUsage(context1 any, s any, resources any, resources1 any, resourcess any, b any, b1 any) *Manager_SetNodeResourceUsage_Call

SetNodeResourceUsage is a helper method to define mock.On call

  • context1 context.Context
  • s string
  • resources types.Resources
  • resources1 types.Resources
  • resourcess []types.Resources
  • b bool
  • b1 bool

type Manager_GetMetricsDescription_Call

type Manager_GetMetricsDescription_Call struct {
	*mock.Call
}

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

func (*Manager_GetMetricsDescription_Call) Return

func (*Manager_GetMetricsDescription_Call) Run

func (*Manager_GetMetricsDescription_Call) RunAndReturn

type Manager_GetMostIdleNode_Call

type Manager_GetMostIdleNode_Call struct {
	*mock.Call
}

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

func (*Manager_GetMostIdleNode_Call) Return

func (*Manager_GetMostIdleNode_Call) Run

func (_c *Manager_GetMostIdleNode_Call) Run(run func(context1 context.Context, strings []string)) *Manager_GetMostIdleNode_Call

func (*Manager_GetMostIdleNode_Call) RunAndReturn

func (_c *Manager_GetMostIdleNode_Call) RunAndReturn(run func(context1 context.Context, strings []string) (string, error)) *Manager_GetMostIdleNode_Call

type Manager_GetNodeResourceInfo_Call

type Manager_GetNodeResourceInfo_Call struct {
	*mock.Call
}

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

func (*Manager_GetNodeResourceInfo_Call) Return

func (*Manager_GetNodeResourceInfo_Call) Run

func (*Manager_GetNodeResourceInfo_Call) RunAndReturn

type Manager_GetNodesDeployCapacity_Call

type Manager_GetNodesDeployCapacity_Call struct {
	*mock.Call
}

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

func (*Manager_GetNodesDeployCapacity_Call) Return

func (*Manager_GetNodesDeployCapacity_Call) Run

func (*Manager_GetNodesDeployCapacity_Call) RunAndReturn

type Manager_GetNodesMetrics_Call added in v0.1.4

type Manager_GetNodesMetrics_Call struct {
	*mock.Call
}

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

func (*Manager_GetNodesMetrics_Call) Return added in v0.1.4

func (*Manager_GetNodesMetrics_Call) Run added in v0.1.4

func (*Manager_GetNodesMetrics_Call) RunAndReturn added in v0.1.4

func (_c *Manager_GetNodesMetrics_Call) RunAndReturn(run func(context1 context.Context, nodes []*types2.Node) ([]*types1.Metrics, error)) *Manager_GetNodesMetrics_Call

type Manager_Realloc_Call

type Manager_Realloc_Call struct {
	*mock.Call
}

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

func (*Manager_Realloc_Call) Return

func (_c *Manager_Realloc_Call) Return(resources2 types.Resources, resources3 types.Resources, resources4 types.Resources, err error) *Manager_Realloc_Call

func (*Manager_Realloc_Call) Run

func (_c *Manager_Realloc_Call) Run(run func(context1 context.Context, s string, resources types.Resources, resources1 types.Resources)) *Manager_Realloc_Call

func (*Manager_Realloc_Call) RunAndReturn

func (_c *Manager_Realloc_Call) RunAndReturn(run func(context1 context.Context, s string, resources types.Resources, resources1 types.Resources) (types.Resources, types.Resources, types.Resources, error)) *Manager_Realloc_Call

type Manager_Remap_Call

type Manager_Remap_Call struct {
	*mock.Call
}

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

func (*Manager_Remap_Call) Return

func (_c *Manager_Remap_Call) Return(stringToResources map[string]types.Resources, err error) *Manager_Remap_Call

func (*Manager_Remap_Call) Run

func (_c *Manager_Remap_Call) Run(run func(context1 context.Context, s string, workloads []*types2.Workload)) *Manager_Remap_Call

func (*Manager_Remap_Call) RunAndReturn

func (_c *Manager_Remap_Call) RunAndReturn(run func(context1 context.Context, s string, workloads []*types2.Workload) (map[string]types.Resources, error)) *Manager_Remap_Call

type Manager_RemoveNode_Call

type Manager_RemoveNode_Call struct {
	*mock.Call
}

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

func (*Manager_RemoveNode_Call) Return

func (*Manager_RemoveNode_Call) Run

func (_c *Manager_RemoveNode_Call) Run(run func(context1 context.Context, s string)) *Manager_RemoveNode_Call

func (*Manager_RemoveNode_Call) RunAndReturn

func (_c *Manager_RemoveNode_Call) RunAndReturn(run func(context1 context.Context, s string) error) *Manager_RemoveNode_Call

type Manager_RollbackAlloc_Call

type Manager_RollbackAlloc_Call struct {
	*mock.Call
}

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

func (*Manager_RollbackAlloc_Call) Return

func (*Manager_RollbackAlloc_Call) Run

func (_c *Manager_RollbackAlloc_Call) Run(run func(context1 context.Context, s string, resourcess []types.Resources)) *Manager_RollbackAlloc_Call

func (*Manager_RollbackAlloc_Call) RunAndReturn

func (_c *Manager_RollbackAlloc_Call) RunAndReturn(run func(context1 context.Context, s string, resourcess []types.Resources) error) *Manager_RollbackAlloc_Call

type Manager_RollbackRealloc_Call

type Manager_RollbackRealloc_Call struct {
	*mock.Call
}

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

func (*Manager_RollbackRealloc_Call) Return

func (*Manager_RollbackRealloc_Call) Run

func (*Manager_RollbackRealloc_Call) RunAndReturn

func (_c *Manager_RollbackRealloc_Call) RunAndReturn(run func(context1 context.Context, s string, resources types.Resources) error) *Manager_RollbackRealloc_Call

type Manager_SetNodeResourceCapacity_Call

type Manager_SetNodeResourceCapacity_Call struct {
	*mock.Call
}

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

func (*Manager_SetNodeResourceCapacity_Call) Return

func (*Manager_SetNodeResourceCapacity_Call) Run

func (*Manager_SetNodeResourceCapacity_Call) RunAndReturn

type Manager_SetNodeResourceUsage_Call

type Manager_SetNodeResourceUsage_Call struct {
	*mock.Call
}

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

func (*Manager_SetNodeResourceUsage_Call) Return

func (*Manager_SetNodeResourceUsage_Call) Run

func (_c *Manager_SetNodeResourceUsage_Call) Run(run func(context1 context.Context, s string, resources types.Resources, resources1 types.Resources, resourcess []types.Resources, b bool, b1 bool)) *Manager_SetNodeResourceUsage_Call

func (*Manager_SetNodeResourceUsage_Call) RunAndReturn

func (_c *Manager_SetNodeResourceUsage_Call) RunAndReturn(run func(context1 context.Context, s string, resources types.Resources, resources1 types.Resources, resourcess []types.Resources, b bool, b1 bool) (types.Resources, types.Resources, error)) *Manager_SetNodeResourceUsage_Call

Jump to

Keyboard shortcuts

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