Documentation ¶
Overview ¶
Package scheduler is a generated GoMock package.
Index ¶
- func New(apiClient client.Client, informerCache runtimecache.Cache, ...) apisv1alpha1.VolumeScheduler
- type MockScheduler
- func (m *MockScheduler) Allocate(vol *apisv1alpha1.LocalVolume) (*apisv1alpha1.VolumeConfig, error)
- func (m *MockScheduler) EXPECT() *MockSchedulerMockRecorder
- func (m *MockScheduler) GetNodeCandidates(vol *apisv1alpha1.LocalVolume) ([]*apisv1alpha1.LocalStorageNode, error)
- func (m *MockScheduler) Init()
- type MockSchedulerMockRecorder
- type PriorityItem
- type PriorityQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(apiClient client.Client, informerCache runtimecache.Cache, maxHAVolumeCount int) apisv1alpha1.VolumeScheduler
New a scheduler instance
Types ¶
type MockScheduler ¶
type MockScheduler struct {
// contains filtered or unexported fields
}
MockScheduler is a mock of Scheduler interface.
func NewMockScheduler ¶
func NewMockScheduler(ctrl *gomock.Controller) *MockScheduler
NewMockScheduler creates a new mock instance.
func (*MockScheduler) Allocate ¶
func (m *MockScheduler) Allocate(vol *apisv1alpha1.LocalVolume) (*apisv1alpha1.VolumeConfig, error)
Allocate mocks base method.
func (*MockScheduler) EXPECT ¶
func (m *MockScheduler) EXPECT() *MockSchedulerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockScheduler) GetNodeCandidates ¶
func (m *MockScheduler) GetNodeCandidates(vol *apisv1alpha1.LocalVolume) ([]*apisv1alpha1.LocalStorageNode, error)
GetNodeCandidates mocks base method.
type MockSchedulerMockRecorder ¶
type MockSchedulerMockRecorder struct {
// contains filtered or unexported fields
}
MockSchedulerMockRecorder is the mock recorder for MockScheduler.
func (*MockSchedulerMockRecorder) Allocate ¶
func (mr *MockSchedulerMockRecorder) Allocate(vol interface{}) *gomock.Call
Allocate indicates an expected call of Allocate.
func (*MockSchedulerMockRecorder) GetNodeCandidates ¶
func (mr *MockSchedulerMockRecorder) GetNodeCandidates(vol interface{}) *gomock.Call
GetNodeCandidates indicates an expected call of GetNodeCandidates.
func (*MockSchedulerMockRecorder) Init ¶
func (mr *MockSchedulerMockRecorder) Init() *gomock.Call
Init indicates an expected call of Init.
type PriorityItem ¶
type PriorityItem struct {
// contains filtered or unexported fields
}
An Item is something we manage in a priority queue.
type PriorityQueue ¶
type PriorityQueue []*PriorityItem
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.