mocks

package
v0.0.0-...-12e0a72 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicePluginClient

type DevicePluginClient struct {
	mock.Mock
}

DevicePluginClient is an autogenerated mock type for the DevicePluginClient type

func NewDevicePluginClient

func NewDevicePluginClient(t mockConstructorTestingTNewDevicePluginClient) *DevicePluginClient

NewDevicePluginClient creates a new instance of DevicePluginClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DevicePluginClient) Restart

func (_m *DevicePluginClient) Restart(ctx context.Context, nodeName string, timeout time.Duration) error

Restart provides a mock function with given fields: ctx, nodeName, timeout

type PartitionCalculator

type PartitionCalculator struct {
	mock.Mock
}

PartitionCalculator is an autogenerated mock type for the PartitionCalculator type

func NewPartitionCalculator

func NewPartitionCalculator(t mockConstructorTestingTNewPartitionCalculator) *PartitionCalculator

NewPartitionCalculator creates a new instance of PartitionCalculator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PartitionCalculator) GetPartitioning

GetPartitioning provides a mock function with given fields: node

type PartitionableNode

type PartitionableNode struct {
	mock.Mock
}

PartitionableNode is an autogenerated mock type for the PartitionableNode type

func NewPartitionableNode

func NewPartitionableNode(t mockConstructorTestingTNewPartitionableNode) *PartitionableNode

NewPartitionableNode creates a new instance of PartitionableNode. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PartitionableNode) AddPod

func (_m *PartitionableNode) AddPod(pod v1.Pod) error

AddPod provides a mock function with given fields: pod

func (*PartitionableNode) Clone

func (_m *PartitionableNode) Clone() interface{}

Clone provides a mock function with given fields:

func (*PartitionableNode) Geometry

func (_m *PartitionableNode) Geometry() map[gpu.Slice]int

Geometry provides a mock function with given fields:

func (*PartitionableNode) GetName

func (_m *PartitionableNode) GetName() string

Name provides a mock function with given fields:

func (*PartitionableNode) HasFreeCapacity

func (_m *PartitionableNode) HasFreeCapacity() bool

HasFreeCapacity provides a mock function with given fields:

func (*PartitionableNode) NodeInfo

func (_m *PartitionableNode) NodeInfo() framework.NodeInfo

NodeInfo provides a mock function with given fields:

func (*PartitionableNode) UpdateGeometryFor

func (_m *PartitionableNode) UpdateGeometryFor(slices map[gpu.Slice]int) (bool, error)

UpdateGeometryFor provides a mock function with given fields: slices

type Partitioner

type Partitioner struct {
	mock.Mock
}

Partitioner is an autogenerated mock type for the Partitioner type

func NewPartitioner

func NewPartitioner(t mockConstructorTestingTNewPartitioner) *Partitioner

NewPartitioner creates a new instance of Partitioner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Partitioner) ApplyPartitioning

func (_m *Partitioner) ApplyPartitioning(ctx context.Context, node v1.Node, planId string, partitioning state.NodePartitioning) error

ApplyPartitioning provides a mock function with given fields: ctx, node, planId, partitioning

type SliceCalculator

type SliceCalculator struct {
	mock.Mock
}

SliceCalculator is an autogenerated mock type for the SliceCalculator type

func NewSliceCalculator

func NewSliceCalculator(t mockConstructorTestingTNewSliceCalculator) *SliceCalculator

NewSliceCalculator creates a new instance of SliceCalculator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SliceCalculator) GetRequestedSlices

func (_m *SliceCalculator) GetRequestedSlices(pod v1.Pod) map[gpu.Slice]int

GetRequestedSlices provides a mock function with given fields: pod

type SliceFilter

type SliceFilter struct {
	mock.Mock
}

SliceFilter is an autogenerated mock type for the SliceFilter type

func NewSliceFilter

func NewSliceFilter(t mockConstructorTestingTNewSliceFilter) *SliceFilter

NewSliceFilter creates a new instance of SliceFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SliceFilter) ExtractSlices

func (_m *SliceFilter) ExtractSlices(resources map[v1.ResourceName]int64) map[gpu.Slice]int

ExtractSlices provides a mock function with given fields: resources

type Snapshot

type Snapshot struct {
	mock.Mock
}

Snapshot is an autogenerated mock type for the Snapshot type

func NewSnapshot

func NewSnapshot(t mockConstructorTestingTNewSnapshot) *Snapshot

NewSnapshot creates a new instance of Snapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Snapshot) AddPod

func (_m *Snapshot) AddPod(node string, pod v1.Pod) error

AddPod provides a mock function with given fields: node, pod

func (*Snapshot) Clone

func (_m *Snapshot) Clone() core.Snapshot

Clone provides a mock function with given fields:

func (*Snapshot) Commit

func (_m *Snapshot) Commit()

Commit provides a mock function with given fields:

func (*Snapshot) Fork

func (_m *Snapshot) Fork() error

Fork provides a mock function with given fields:

func (*Snapshot) GetCandidateNodes

func (_m *Snapshot) GetCandidateNodes() []core.PartitionableNode

GetCandidateNodes provides a mock function with given fields:

func (*Snapshot) GetLackingSlices

func (_m *Snapshot) GetLackingSlices(pod v1.Pod) map[gpu.Slice]int

GetLackingSlices provides a mock function with given fields: pod

func (*Snapshot) GetNode

func (_m *Snapshot) GetNode(name string) (core.PartitionableNode, bool)

GetNode provides a mock function with given fields: name

func (*Snapshot) GetNodes

func (_m *Snapshot) GetNodes() map[string]core.PartitionableNode

GetNodes provides a mock function with given fields:

func (*Snapshot) GetPartitioningState

func (_m *Snapshot) GetPartitioningState() state.PartitioningState

GetPartitioningState provides a mock function with given fields:

func (*Snapshot) Revert

func (_m *Snapshot) Revert()

Revert provides a mock function with given fields:

func (*Snapshot) SetNode

func (_m *Snapshot) SetNode(n core.PartitionableNode)

SetNode provides a mock function with given fields: n

type SnapshotTaker

type SnapshotTaker struct {
	mock.Mock
}

SnapshotTaker is an autogenerated mock type for the SnapshotTaker type

func NewSnapshotTaker

func NewSnapshotTaker(t mockConstructorTestingTNewSnapshotTaker) *SnapshotTaker

NewSnapshotTaker creates a new instance of SnapshotTaker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SnapshotTaker) TakeSnapshot

func (_m *SnapshotTaker) TakeSnapshot(clusterState *state.ClusterState) (core.Snapshot, error)

TakeSnapshot provides a mock function with given fields: clusterState

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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