Documentation ¶
Overview ¶
Package worker is a generated GoMock package.
Package worker is a generated GoMock package.
Package mock_worker is a generated GoMock package.
Package mock_worker is a generated GoMock package.
Package worker is a generated GoMock package.
Index ¶
- Constants
- func EscapeGroupID(groupID string) string
- type Controller
- type Mockexecutor
- type MockexecutorMockRecorder
- type MockpodSpecSyncer
- type MockpodSpecSyncerMockRecorder
- type MockpodStatusParser
- type MockpodStatusParserMockRecorder
- type Mockprocessor
- type MockprocessorMockRecorder
- type Mockscheduler
- type MockschedulerMockRecorder
- type MockworkerAdjuster
- type MockworkerAdjusterMockRecorder
- type MockworkerAllocator
- type MockworkerAllocatorMockRecorder
- type MockworkerStateMachine
- type MockworkerStateMachineMockRecorder
- type MockworkerUpdater
- type MockworkerUpdaterMockRecorder
Constants ¶
const ( SchedulerNameMock = "mock" HippoPriorityClassPrefix = "hippo-priority" C2DeleteProtectionFinalizer = "protection-delete.pod.c2/service" )
LabelKeys
const ( // AliyunEni Elastic Network Interface https://www.alibabacloud.com/help/zh/doc-detail/58496.htm AliyunEni = "aliyun/eni" // K8SStdResourceKeyDISK k8s standard disk resource key K8SStdResourceKeyDISK = "ephemeral-storage" )
const ( HealthStatusOffline = -1 HealthStatusPsFailed = 1 )
pod healthscore
const (
// SuccessSynced is used as part of the Event 'reason' when a WorkerNode is synced
SuccessSynced = "Synced"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct { schema.GroupVersionKind controller.DefaultController // contains filtered or unexported fields }
Controller is the controller implementation for workernode resources
func NewController ¶
func NewController( carbonclientset clientset.Interface, kubeclientset kubernetes.Interface, workerInformer informers.WorkerNodeInformer, serviceInformer informers.ServicePublisherInformer, rollingSetInformer informers.RollingSetInformer, podInformer coreinformers.PodInformer, configMapInformer coreinformers.ConfigMapInformer, writeLabels map[string]string) *Controller
NewController returns a new workerallocator controller
func (*Controller) DeleteSubObj ¶
func (c *Controller) DeleteSubObj(namespace, key string) error
DeleteSubObj do garbage collect
func (*Controller) GetObj ¶
func (c *Controller) GetObj(namespace, key string) (interface{}, error)
GetObj grep worker
func (*Controller) Sync ¶
func (c *Controller) Sync(key string) error
Sync compares the actual state with the desired, and attempts to converge the two.
func (*Controller) WaitForCacheSync ¶
func (c *Controller) WaitForCacheSync(stopCh <-chan struct{}) bool
WaitForCacheSync wait informers synced
type Mockexecutor ¶
type Mockexecutor struct {
// contains filtered or unexported fields
}
Mockexecutor is a mock of executor interface.
func NewMockexecutor ¶
func NewMockexecutor(ctrl *gomock.Controller) *Mockexecutor
NewMockexecutor creates a new mock instance.
func (*Mockexecutor) EXPECT ¶
func (m *Mockexecutor) EXPECT() *MockexecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockexecutorMockRecorder ¶
type MockexecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockexecutorMockRecorder is the mock recorder for Mockexecutor.
type MockpodSpecSyncer ¶
type MockpodSpecSyncer struct {
// contains filtered or unexported fields
}
MockpodSpecSyncer is a mock of podSpecSyncer interface.
func NewMockpodSpecSyncer ¶
func NewMockpodSpecSyncer(ctrl *gomock.Controller) *MockpodSpecSyncer
NewMockpodSpecSyncer creates a new mock instance.
func (*MockpodSpecSyncer) EXPECT ¶
func (m *MockpodSpecSyncer) EXPECT() *MockpodSpecSyncerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpodSpecSyncer) MergeWebHooks ¶
func (m *MockpodSpecSyncer) MergeWebHooks(targetPod *v10.Pod, podSpec *v10.PodSpec, currentPod *v10.Pod) error
MergeWebHooks mocks base method.
type MockpodSpecSyncerMockRecorder ¶
type MockpodSpecSyncerMockRecorder struct {
// contains filtered or unexported fields
}
MockpodSpecSyncerMockRecorder is the mock recorder for MockpodSpecSyncer.
func (*MockpodSpecSyncerMockRecorder) MergeWebHooks ¶
func (mr *MockpodSpecSyncerMockRecorder) MergeWebHooks(targetPod, podSpec, currentPod interface{}) *gomock.Call
MergeWebHooks indicates an expected call of MergeWebHooks.
type MockpodStatusParser ¶
type MockpodStatusParser struct {
// contains filtered or unexported fields
}
MockpodStatusParser is a mock of podStatusParser interface.
func NewMockpodStatusParser ¶
func NewMockpodStatusParser(ctrl *gomock.Controller) *MockpodStatusParser
NewMockpodStatusParser creates a new mock instance.
func (*MockpodStatusParser) EXPECT ¶
func (m *MockpodStatusParser) EXPECT() *MockpodStatusParserMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockpodStatusParserMockRecorder ¶
type MockpodStatusParserMockRecorder struct {
// contains filtered or unexported fields
}
MockpodStatusParserMockRecorder is the mock recorder for MockpodStatusParser.
type Mockprocessor ¶
type Mockprocessor struct {
// contains filtered or unexported fields
}
Mockprocessor is a mock of processor interface.
func NewMockprocessor ¶
func NewMockprocessor(ctrl *gomock.Controller) *Mockprocessor
NewMockprocessor creates a new mock instance.
func (*Mockprocessor) EXPECT ¶
func (m *Mockprocessor) EXPECT() *MockprocessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockprocessorMockRecorder ¶
type MockprocessorMockRecorder struct {
// contains filtered or unexported fields
}
MockprocessorMockRecorder is the mock recorder for Mockprocessor.
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) EXPECT ¶
func (m *Mockscheduler) EXPECT() *MockschedulerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockschedulerMockRecorder ¶
type MockschedulerMockRecorder struct {
// contains filtered or unexported fields
}
MockschedulerMockRecorder is the mock recorder for Mockscheduler
type MockworkerAdjuster ¶
type MockworkerAdjuster struct {
// contains filtered or unexported fields
}
MockworkerAdjuster is a mock of workerAdjuster interface
func NewMockworkerAdjuster ¶
func NewMockworkerAdjuster(ctrl *gomock.Controller) *MockworkerAdjuster
NewMockworkerAdjuster creates a new mock instance
func (*MockworkerAdjuster) EXPECT ¶
func (m *MockworkerAdjuster) EXPECT() *MockworkerAdjusterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockworkerAdjusterMockRecorder ¶
type MockworkerAdjusterMockRecorder struct {
// contains filtered or unexported fields
}
MockworkerAdjusterMockRecorder is the mock recorder for MockworkerAdjuster
type MockworkerAllocator ¶
type MockworkerAllocator struct {
// contains filtered or unexported fields
}
MockworkerAllocator is a mock of workerAllocator interface.
func NewMockworkerAllocator ¶
func NewMockworkerAllocator(ctrl *gomock.Controller) *MockworkerAllocator
NewMockworkerAllocator creates a new mock instance.
func (*MockworkerAllocator) EXPECT ¶
func (m *MockworkerAllocator) EXPECT() *MockworkerAllocatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockworkerAllocatorMockRecorder ¶
type MockworkerAllocatorMockRecorder struct {
// contains filtered or unexported fields
}
MockworkerAllocatorMockRecorder is the mock recorder for MockworkerAllocator.
type MockworkerStateMachine ¶
type MockworkerStateMachine struct {
// contains filtered or unexported fields
}
MockworkerStateMachine is a mock of workerStateMachine interface.
func NewMockworkerStateMachine ¶
func NewMockworkerStateMachine(ctrl *gomock.Controller) *MockworkerStateMachine
NewMockworkerStateMachine creates a new mock instance.
func (*MockworkerStateMachine) EXPECT ¶
func (m *MockworkerStateMachine) EXPECT() *MockworkerStateMachineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockworkerStateMachineMockRecorder ¶
type MockworkerStateMachineMockRecorder struct {
// contains filtered or unexported fields
}
MockworkerStateMachineMockRecorder is the mock recorder for MockworkerStateMachine.
type MockworkerUpdater ¶
type MockworkerUpdater struct {
// contains filtered or unexported fields
}
MockworkerUpdater is a mock of workerUpdater interface.
func NewMockworkerUpdater ¶
func NewMockworkerUpdater(ctrl *gomock.Controller) *MockworkerUpdater
NewMockworkerUpdater creates a new mock instance.
func (*MockworkerUpdater) EXPECT ¶
func (m *MockworkerUpdater) EXPECT() *MockworkerUpdaterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockworkerUpdaterMockRecorder ¶
type MockworkerUpdaterMockRecorder struct {
// contains filtered or unexported fields
}
MockworkerUpdaterMockRecorder is the mock recorder for MockworkerUpdater.