Documentation ¶
Overview ¶
Package service is a generated GoMock package.
Package service is a generated GoMock package.
Package service is a generated GoMock package.
Package service is a generated GoMock package.
Index ¶
- Constants
- func InitFlags(flagset *pflag.FlagSet)
- func SliceContainsSlice(parent, child []string) bool
- func ToJSONString(obj interface{}) string
- type Factory
- type GroupService
- type Location
- type MockGroupService
- func (m *MockGroupService) DeleteGroup(appName, schType, groupID string) error
- func (m *MockGroupService) DisableScale(appName, groupID, zoneName string) error
- func (m *MockGroupService) EXPECT() *MockGroupServiceMockRecorder
- func (m *MockGroupService) GetAppGroup(appName, schType string) ([]*carbon.GroupStatus, error)
- func (m *MockGroupService) GetGroup(appName, schType string, groupIds []string) ([]*carbon.GroupStatus, error)
- func (m *MockGroupService) NewGroup(appName string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error
- func (m *MockGroupService) ReclaimWorkerNodesOnEviction(appName string, req *ReclaimWorkerNodeRequest) error
- func (m *MockGroupService) ScaleGroup(appName, groupID, zoneName string, scalePlan *v1.ScaleSchedulePlan) error
- func (m *MockGroupService) SetGroup(appName, groupID string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error
- func (m *MockGroupService) SetGroups(appName string, schOpts *SchOptions, groupPlans map[string]*typespec.GroupPlan) error
- type MockGroupServiceMockRecorder
- func (mr *MockGroupServiceMockRecorder) DeleteGroup(appName, schType, groupID interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) DisableScale(appName, groupID, zoneName interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) GetAppGroup(appName, schType interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) GetGroup(appName, schType, groupIds interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) NewGroup(appName, schOpts, groupPlan interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) ReclaimWorkerNodesOnEviction(appName, req interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) ScaleGroup(appName, groupID, zoneName, scalePlan interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) SetGroup(appName, groupID, schOpts, groupPlan interface{}) *gomock.Call
- func (mr *MockGroupServiceMockRecorder) SetGroups(appName, schOpts, groupPlans interface{}) *gomock.Call
- type MockRollingsetService
- func (m *MockRollingsetService) Create(location *Location, rs *v1.RollingSet) error
- func (m *MockRollingsetService) Delete(location *Location) error
- func (m *MockRollingsetService) EXPECT() *MockRollingsetServiceMockRecorder
- func (m *MockRollingsetService) Get(location *Location) (*v1.RollingSet, error)
- func (m *MockRollingsetService) GetReplicaStatus(location *Location) (*v1.ReplicaStatus, error)
- func (m *MockRollingsetService) GetSubrsInfo(rs *v1.RollingSet) (v1.SubrsMetas, v1.SubrsVersionStatusMap, map[string]*int32, error)
- func (m *MockRollingsetService) ListReplicaStatus(location *Location) ([]*v1.ReplicaStatus, map[string]string, error)
- func (m *MockRollingsetService) Patch(location *Location, patch *v1.RollingsetPatch) error
- func (m *MockRollingsetService) ReclaimWorkerNode(location *Location) error
- func (m *MockRollingsetService) SyncSubrs(location *Location, subrsMap map[string]*v1.Subrs, subrsEnable bool) error
- func (m *MockRollingsetService) Update(location *Location, rs *v1.RollingSet) error
- type MockRollingsetServiceMockRecorder
- func (mr *MockRollingsetServiceMockRecorder) Create(location, rs interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) Delete(location interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) Get(location interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) GetReplicaStatus(location interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) GetSubrsInfo(rs interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) ListReplicaStatus(location interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) Patch(location, patch interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) ReclaimWorkerNode(location interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) SyncSubrs(location, subrsMap, subrsEnable interface{}) *gomock.Call
- func (mr *MockRollingsetServiceMockRecorder) Update(location, rs interface{}) *gomock.Call
- type Mockk8sSyncer
- type Mockk8sSyncerMockRecorder
- type MockresourceManager
- type MockresourceManagerMockRecorder
- type ReclaimWorkerNodePreference
- type ReclaimWorkerNodeRequest
- type SchOptions
- type Serverless
Constants ¶
const ( SchTypeRole = "role" SchTypeGroup = "group" SchTypeNode = "node" )
SchTypes
Variables ¶
This section is empty.
Functions ¶
func SliceContainsSlice ¶
SliceContainsSlice slice contains slice or not
Types ¶
type Factory ¶
type Factory struct { GroupService GroupService DynamicInterface dynamic.Interface // contains filtered or unexported fields }
Factory create services.
func NewFactory ¶
func NewFactory(cluster, kubeConfigFile, contentType string, stopCh <-chan struct{}) (*Factory, error)
NewFactory create service factory
type GroupService ¶
type GroupService interface { GetAppGroup(appName, schType string) ([]*carbon.GroupStatus, error) GetGroup(appName, schType string, groupIds []string) ([]*carbon.GroupStatus, error) DeleteGroup(appName, schType, groupID string) error NewGroup(appName string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error SetGroups(appName string, schOpts *SchOptions, groupPlans map[string]*typespec.GroupPlan) error SetGroup(appName, groupID string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error ScaleGroup(appName, groupID, zoneName string, scalePlan *carbonv1.ScaleSchedulePlan) error DisableScale(appName, groupID, zoneName string) error ReclaimWorkerNodesOnEviction(appName string, req *ReclaimWorkerNodeRequest) error }
GroupService operates on groups
type Location ¶
type Location struct { Cluster string `json:"cluster,omitempty"` HippoAppName string `json:"hippoAppName,omitempty"` Namespace string `json:"namespace,omitempty"` Rollingset string `json:"rollingset,omitempty"` Replica string `json:"replica,omitempty"` WorkerNode string `json:"workerNode,omitempty"` Serverless *Serverless `json:"serverless,omitempty"` }
type MockGroupService ¶
type MockGroupService struct {
// contains filtered or unexported fields
}
MockGroupService is a mock of GroupService interface.
func NewMockGroupService ¶
func NewMockGroupService(ctrl *gomock.Controller) *MockGroupService
NewMockGroupService creates a new mock instance.
func (*MockGroupService) DeleteGroup ¶
func (m *MockGroupService) DeleteGroup(appName, schType, groupID string) error
DeleteGroup mocks base method.
func (*MockGroupService) DisableScale ¶
func (m *MockGroupService) DisableScale(appName, groupID, zoneName string) error
DisableScale mocks base method.
func (*MockGroupService) EXPECT ¶
func (m *MockGroupService) EXPECT() *MockGroupServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGroupService) GetAppGroup ¶
func (m *MockGroupService) GetAppGroup(appName, schType string) ([]*carbon.GroupStatus, error)
GetAppGroup mocks base method.
func (*MockGroupService) GetGroup ¶
func (m *MockGroupService) GetGroup(appName, schType string, groupIds []string) ([]*carbon.GroupStatus, error)
GetGroup mocks base method.
func (*MockGroupService) NewGroup ¶
func (m *MockGroupService) NewGroup(appName string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error
NewGroup mocks base method.
func (*MockGroupService) ReclaimWorkerNodesOnEviction ¶
func (m *MockGroupService) ReclaimWorkerNodesOnEviction(appName string, req *ReclaimWorkerNodeRequest) error
ReclaimWorkerNodesOnEviction mocks base method.
func (*MockGroupService) ScaleGroup ¶
func (m *MockGroupService) ScaleGroup(appName, groupID, zoneName string, scalePlan *v1.ScaleSchedulePlan) error
ScaleGroup mocks base method.
func (*MockGroupService) SetGroup ¶
func (m *MockGroupService) SetGroup(appName, groupID string, schOpts *SchOptions, groupPlan *typespec.GroupPlan) error
SetGroup mocks base method.
func (*MockGroupService) SetGroups ¶
func (m *MockGroupService) SetGroups(appName string, schOpts *SchOptions, groupPlans map[string]*typespec.GroupPlan) error
SetGroups mocks base method.
type MockGroupServiceMockRecorder ¶
type MockGroupServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockGroupServiceMockRecorder is the mock recorder for MockGroupService.
func (*MockGroupServiceMockRecorder) DeleteGroup ¶
func (mr *MockGroupServiceMockRecorder) DeleteGroup(appName, schType, groupID interface{}) *gomock.Call
DeleteGroup indicates an expected call of DeleteGroup.
func (*MockGroupServiceMockRecorder) DisableScale ¶
func (mr *MockGroupServiceMockRecorder) DisableScale(appName, groupID, zoneName interface{}) *gomock.Call
DisableScale indicates an expected call of DisableScale.
func (*MockGroupServiceMockRecorder) GetAppGroup ¶
func (mr *MockGroupServiceMockRecorder) GetAppGroup(appName, schType interface{}) *gomock.Call
GetAppGroup indicates an expected call of GetAppGroup.
func (*MockGroupServiceMockRecorder) GetGroup ¶
func (mr *MockGroupServiceMockRecorder) GetGroup(appName, schType, groupIds interface{}) *gomock.Call
GetGroup indicates an expected call of GetGroup.
func (*MockGroupServiceMockRecorder) NewGroup ¶
func (mr *MockGroupServiceMockRecorder) NewGroup(appName, schOpts, groupPlan interface{}) *gomock.Call
NewGroup indicates an expected call of NewGroup.
func (*MockGroupServiceMockRecorder) ReclaimWorkerNodesOnEviction ¶
func (mr *MockGroupServiceMockRecorder) ReclaimWorkerNodesOnEviction(appName, req interface{}) *gomock.Call
ReclaimWorkerNodesOnEviction indicates an expected call of ReclaimWorkerNodesOnEviction.
func (*MockGroupServiceMockRecorder) ScaleGroup ¶
func (mr *MockGroupServiceMockRecorder) ScaleGroup(appName, groupID, zoneName, scalePlan interface{}) *gomock.Call
ScaleGroup indicates an expected call of ScaleGroup.
func (*MockGroupServiceMockRecorder) SetGroup ¶
func (mr *MockGroupServiceMockRecorder) SetGroup(appName, groupID, schOpts, groupPlan interface{}) *gomock.Call
SetGroup indicates an expected call of SetGroup.
func (*MockGroupServiceMockRecorder) SetGroups ¶
func (mr *MockGroupServiceMockRecorder) SetGroups(appName, schOpts, groupPlans interface{}) *gomock.Call
SetGroups indicates an expected call of SetGroups.
type MockRollingsetService ¶
type MockRollingsetService struct {
// contains filtered or unexported fields
}
MockRollingsetService is a mock of RollingsetService interface.
func NewMockRollingsetService ¶
func NewMockRollingsetService(ctrl *gomock.Controller) *MockRollingsetService
NewMockRollingsetService creates a new mock instance.
func (*MockRollingsetService) Create ¶
func (m *MockRollingsetService) Create(location *Location, rs *v1.RollingSet) error
Create mocks base method.
func (*MockRollingsetService) Delete ¶
func (m *MockRollingsetService) Delete(location *Location) error
Delete mocks base method.
func (*MockRollingsetService) EXPECT ¶
func (m *MockRollingsetService) EXPECT() *MockRollingsetServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRollingsetService) Get ¶
func (m *MockRollingsetService) Get(location *Location) (*v1.RollingSet, error)
Get mocks base method.
func (*MockRollingsetService) GetReplicaStatus ¶
func (m *MockRollingsetService) GetReplicaStatus(location *Location) (*v1.ReplicaStatus, error)
GetReplicaStatus mocks base method.
func (*MockRollingsetService) GetSubrsInfo ¶
func (m *MockRollingsetService) GetSubrsInfo(rs *v1.RollingSet) (v1.SubrsMetas, v1.SubrsVersionStatusMap, map[string]*int32, error)
GetSubrsInfo mocks base method.
func (*MockRollingsetService) ListReplicaStatus ¶
func (m *MockRollingsetService) ListReplicaStatus(location *Location) ([]*v1.ReplicaStatus, map[string]string, error)
ListReplicaStatus mocks base method.
func (*MockRollingsetService) Patch ¶
func (m *MockRollingsetService) Patch(location *Location, patch *v1.RollingsetPatch) error
Patch mocks base method.
func (*MockRollingsetService) ReclaimWorkerNode ¶
func (m *MockRollingsetService) ReclaimWorkerNode(location *Location) error
ReclaimWorkerNode mocks base method.
func (*MockRollingsetService) SyncSubrs ¶
func (m *MockRollingsetService) SyncSubrs(location *Location, subrsMap map[string]*v1.Subrs, subrsEnable bool) error
SyncSubrs mocks base method.
func (*MockRollingsetService) Update ¶
func (m *MockRollingsetService) Update(location *Location, rs *v1.RollingSet) error
Update mocks base method.
type MockRollingsetServiceMockRecorder ¶
type MockRollingsetServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockRollingsetServiceMockRecorder is the mock recorder for MockRollingsetService.
func (*MockRollingsetServiceMockRecorder) Create ¶
func (mr *MockRollingsetServiceMockRecorder) Create(location, rs interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockRollingsetServiceMockRecorder) Delete ¶
func (mr *MockRollingsetServiceMockRecorder) Delete(location interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockRollingsetServiceMockRecorder) Get ¶
func (mr *MockRollingsetServiceMockRecorder) Get(location interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockRollingsetServiceMockRecorder) GetReplicaStatus ¶
func (mr *MockRollingsetServiceMockRecorder) GetReplicaStatus(location interface{}) *gomock.Call
GetReplicaStatus indicates an expected call of GetReplicaStatus.
func (*MockRollingsetServiceMockRecorder) GetSubrsInfo ¶
func (mr *MockRollingsetServiceMockRecorder) GetSubrsInfo(rs interface{}) *gomock.Call
GetSubrsInfo indicates an expected call of GetSubrsInfo.
func (*MockRollingsetServiceMockRecorder) ListReplicaStatus ¶
func (mr *MockRollingsetServiceMockRecorder) ListReplicaStatus(location interface{}) *gomock.Call
ListReplicaStatus indicates an expected call of ListReplicaStatus.
func (*MockRollingsetServiceMockRecorder) Patch ¶
func (mr *MockRollingsetServiceMockRecorder) Patch(location, patch interface{}) *gomock.Call
Patch indicates an expected call of Patch.
func (*MockRollingsetServiceMockRecorder) ReclaimWorkerNode ¶
func (mr *MockRollingsetServiceMockRecorder) ReclaimWorkerNode(location interface{}) *gomock.Call
ReclaimWorkerNode indicates an expected call of ReclaimWorkerNode.
func (*MockRollingsetServiceMockRecorder) SyncSubrs ¶
func (mr *MockRollingsetServiceMockRecorder) SyncSubrs(location, subrsMap, subrsEnable interface{}) *gomock.Call
SyncSubrs indicates an expected call of SyncSubrs.
func (*MockRollingsetServiceMockRecorder) Update ¶
func (mr *MockRollingsetServiceMockRecorder) Update(location, rs interface{}) *gomock.Call
Update indicates an expected call of Update.
type Mockk8sSyncer ¶
type Mockk8sSyncer struct {
// contains filtered or unexported fields
}
Mockk8sSyncer is a mock of k8sSyncer interface.
func NewMockk8sSyncer ¶
func NewMockk8sSyncer(ctrl *gomock.Controller) *Mockk8sSyncer
NewMockk8sSyncer creates a new mock instance.
func (*Mockk8sSyncer) EXPECT ¶
func (m *Mockk8sSyncer) EXPECT() *Mockk8sSyncerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type Mockk8sSyncerMockRecorder ¶
type Mockk8sSyncerMockRecorder struct {
// contains filtered or unexported fields
}
Mockk8sSyncerMockRecorder is the mock recorder for Mockk8sSyncer.
type MockresourceManager ¶
type MockresourceManager struct {
// contains filtered or unexported fields
}
MockresourceManager is a mock of resourceManager interface.
func NewMockresourceManager ¶
func NewMockresourceManager(ctrl *gomock.Controller) *MockresourceManager
NewMockresourceManager creates a new mock instance.
func (*MockresourceManager) EXPECT ¶
func (m *MockresourceManager) EXPECT() *MockresourceManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockresourceManagerMockRecorder ¶
type MockresourceManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockresourceManagerMockRecorder is the mock recorder for MockresourceManager.
type ReclaimWorkerNodePreference ¶
type ReclaimWorkerNodePreference struct { Scope *string `json:"scope"` Type *string `json:"type"` TTL *int32 `json:"ttl"` }
ReclaimWorkerNodePreference preference to reclaim worker node
type ReclaimWorkerNodeRequest ¶
type ReclaimWorkerNodeRequest struct { WorkerNodes []*carbonv1.ReclaimWorkerNode `json:"workerNodes"` Preference *ReclaimWorkerNodePreference `json:"preference"` }
ReclaimWorkerNodeRequest reclaim a list of worker nodes
type SchOptions ¶
type SchOptions struct { SchType string `json:"schType"` AppChecksum string `json:"appChecksum"` ZKAddress string `json:"zkAddress"` }
SchOptions options for scheduler.
func ParseSchOptions ¶
func ParseSchOptions(str string) (*SchOptions, error)
ParseSchOptions parse schedule options.