Documentation ¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- Constants
- type Event
- type EventType
- type Informer
- type Lister
- type MockStorer
- func (m *MockStorer) EXPECT() *MockStorerMockRecorder
- func (m *MockStorer) GetAllAppServices() []*v1.AppService
- func (m *MockStorer) GetAppService(serviceID string) *v1.AppService
- func (m *MockStorer) GetAppServiceStatus(serviceID string) string
- func (m *MockStorer) GetAppServicesStatus(serviceIDs []string) map[string]string
- func (m *MockStorer) GetNeedBillingStatus(serviceIDs []string) map[string]string
- func (m *MockStorer) GetPodLister() v11.PodLister
- func (m *MockStorer) GetTenantEnvResource(tenantEnvID string) *v1.TenantEnvResource
- func (m *MockStorer) GetTenantEnvRunningApp(tenantEnvID string) []*v1.AppService
- func (m *MockStorer) InitOneThirdPartService(service *model.TenantEnvServices) error
- func (m *MockStorer) OnDeletes(obj ...interface{})
- func (m *MockStorer) Ready() bool
- func (m *MockStorer) RegistAppService(arg0 *v1.AppService)
- func (m *MockStorer) RegistPodUpdateListener(arg0 string, arg1 chan<- *v10.Pod)
- func (m *MockStorer) RegisterVolumeTypeListener(arg0 string, arg1 chan<- *model.TenantEnvServiceVolumeType)
- func (m *MockStorer) Start() error
- func (m *MockStorer) UnRegistPodUpdateListener(arg0 string)
- func (m *MockStorer) UnRegisterVolumeTypeListener(arg0 string)
- func (m *MockStorer) UpdateGetAppService(serviceID string) *v1.AppService
- type MockStorerMockRecorder
- func (mr *MockStorerMockRecorder) GetAllAppServices() *gomock.Call
- func (mr *MockStorerMockRecorder) GetAppService(serviceID interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) GetAppServiceStatus(serviceID interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) GetAppServicesStatus(serviceIDs interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) GetNeedBillingStatus(serviceIDs interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) GetPodLister() *gomock.Call
- func (mr *MockStorerMockRecorder) GetTenantEnvResource(tenantEnvID interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) GetTenantEnvRunningApp(tenantEnvID interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) InitOneThirdPartService(service interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) OnDeletes(obj ...interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) Ready() *gomock.Call
- func (mr *MockStorerMockRecorder) RegistAppService(arg0 interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) RegistPodUpdateListener(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) RegisterVolumeTypeListener(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) Start() *gomock.Call
- func (mr *MockStorerMockRecorder) UnRegistPodUpdateListener(arg0 interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) UnRegisterVolumeTypeListener(arg0 interface{}) *gomock.Call
- func (mr *MockStorerMockRecorder) UpdateGetAppService(serviceID interface{}) *gomock.Call
- type NamespaceResource
- type ResourceCache
- type Storer
- type TenantEnvResource
Constants ¶
const ServiceMonitor = "servicemonitors.monitoring.coreos.com"
ServiceMonitor service monitor custom resource
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type EventType Obj interface{} }
Event holds the context of an event.
type EventType ¶
type EventType string
EventType type of event associated with an informer
const ( // CreateEvent event associated with new objects in an informer CreateEvent EventType = "CREATE" // UpdateEvent event associated with an object update in an informer UpdateEvent EventType = "UPDATE" // DeleteEvent event associated when an object is removed from an informer DeleteEvent EventType = "DELETE" )
type Informer ¶
type Informer struct { Namespace cache.SharedIndexInformer Ingress cache.SharedIndexInformer Service cache.SharedIndexInformer Secret cache.SharedIndexInformer StatefulSet cache.SharedIndexInformer Deployment cache.SharedIndexInformer Pod cache.SharedIndexInformer ConfigMap cache.SharedIndexInformer ReplicaSet cache.SharedIndexInformer Endpoints cache.SharedIndexInformer Nodes cache.SharedIndexInformer StorageClass cache.SharedIndexInformer Claims cache.SharedIndexInformer Events cache.SharedIndexInformer HorizontalPodAutoscaler cache.SharedIndexInformer CRD cache.SharedIndexInformer HelmApp cache.SharedIndexInformer ComponentDefinition cache.SharedIndexInformer ThirdComponent cache.SharedIndexInformer CRS map[string]cache.SharedIndexInformer }
Informer kube-api client cache
type Lister ¶
type Lister struct { Ingress networkingv1.IngressLister BetaIngress betav1.IngressLister Service corev1.ServiceLister Secret corev1.SecretLister StatefulSet appsv1.StatefulSetLister Deployment appsv1.DeploymentLister Pod corev1.PodLister ReplicaSets appsv1.ReplicaSetLister ConfigMap corev1.ConfigMapLister Endpoints corev1.EndpointsLister Nodes corev1.NodeLister StorageClass storagev1.StorageClassLister Claims corev1.PersistentVolumeClaimLister HorizontalPodAutoscaler autoscalingv1.HorizontalPodAutoscalerLister CRD crdlisters.CustomResourceDefinitionLister HelmApp v1alpha1.HelmAppLister ComponentDefinition v1alpha1.ComponentDefinitionLister ThirdComponent v1alpha1.ThirdComponentLister }
Lister kube-api client cache
type MockStorer ¶
type MockStorer struct {
// contains filtered or unexported fields
}
MockStorer is a mock of Storer interface
func NewMockStorer ¶
func NewMockStorer(ctrl *gomock.Controller) *MockStorer
NewMockStorer creates a new mock instance
func (*MockStorer) EXPECT ¶
func (m *MockStorer) EXPECT() *MockStorerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStorer) GetAllAppServices ¶
func (m *MockStorer) GetAllAppServices() []*v1.AppService
GetAllAppServices mocks base method
func (*MockStorer) GetAppService ¶
func (m *MockStorer) GetAppService(serviceID string) *v1.AppService
GetAppService mocks base method
func (*MockStorer) GetAppServiceStatus ¶
func (m *MockStorer) GetAppServiceStatus(serviceID string) string
GetAppServiceStatus mocks base method
func (*MockStorer) GetAppServicesStatus ¶
func (m *MockStorer) GetAppServicesStatus(serviceIDs []string) map[string]string
GetAppServicesStatus mocks base method
func (*MockStorer) GetNeedBillingStatus ¶
func (m *MockStorer) GetNeedBillingStatus(serviceIDs []string) map[string]string
GetNeedBillingStatus mocks base method
func (*MockStorer) GetPodLister ¶
func (m *MockStorer) GetPodLister() v11.PodLister
GetPodLister mocks base method
func (*MockStorer) GetTenantEnvResource ¶ added in v1.1.0
func (m *MockStorer) GetTenantEnvResource(tenantEnvID string) *v1.TenantEnvResource
GetTenantEnvResource mocks base method
func (*MockStorer) GetTenantEnvRunningApp ¶ added in v1.1.0
func (m *MockStorer) GetTenantEnvRunningApp(tenantEnvID string) []*v1.AppService
GetTenantEnvRunningApp mocks base method
func (*MockStorer) InitOneThirdPartService ¶
func (m *MockStorer) InitOneThirdPartService(service *model.TenantEnvServices) error
InitOneThirdPartService mocks base method
func (*MockStorer) OnDeletes ¶
func (m *MockStorer) OnDeletes(obj ...interface{})
OnDeletes mocks base method
func (*MockStorer) RegistAppService ¶
func (m *MockStorer) RegistAppService(arg0 *v1.AppService)
RegistAppService mocks base method
func (*MockStorer) RegistPodUpdateListener ¶
func (m *MockStorer) RegistPodUpdateListener(arg0 string, arg1 chan<- *v10.Pod)
RegistPodUpdateListener mocks base method
func (*MockStorer) RegisterVolumeTypeListener ¶
func (m *MockStorer) RegisterVolumeTypeListener(arg0 string, arg1 chan<- *model.TenantEnvServiceVolumeType)
RegisterVolumeTypeListener mocks base method
func (*MockStorer) UnRegistPodUpdateListener ¶
func (m *MockStorer) UnRegistPodUpdateListener(arg0 string)
UnRegistPodUpdateListener mocks base method
func (*MockStorer) UnRegisterVolumeTypeListener ¶
func (m *MockStorer) UnRegisterVolumeTypeListener(arg0 string)
UnRegisterVolumeTypeListener mocks base method
func (*MockStorer) UpdateGetAppService ¶
func (m *MockStorer) UpdateGetAppService(serviceID string) *v1.AppService
UpdateGetAppService mocks base method
type MockStorerMockRecorder ¶
type MockStorerMockRecorder struct {
// contains filtered or unexported fields
}
MockStorerMockRecorder is the mock recorder for MockStorer
func (*MockStorerMockRecorder) GetAllAppServices ¶
func (mr *MockStorerMockRecorder) GetAllAppServices() *gomock.Call
GetAllAppServices indicates an expected call of GetAllAppServices
func (*MockStorerMockRecorder) GetAppService ¶
func (mr *MockStorerMockRecorder) GetAppService(serviceID interface{}) *gomock.Call
GetAppService indicates an expected call of GetAppService
func (*MockStorerMockRecorder) GetAppServiceStatus ¶
func (mr *MockStorerMockRecorder) GetAppServiceStatus(serviceID interface{}) *gomock.Call
GetAppServiceStatus indicates an expected call of GetAppServiceStatus
func (*MockStorerMockRecorder) GetAppServicesStatus ¶
func (mr *MockStorerMockRecorder) GetAppServicesStatus(serviceIDs interface{}) *gomock.Call
GetAppServicesStatus indicates an expected call of GetAppServicesStatus
func (*MockStorerMockRecorder) GetNeedBillingStatus ¶
func (mr *MockStorerMockRecorder) GetNeedBillingStatus(serviceIDs interface{}) *gomock.Call
GetNeedBillingStatus indicates an expected call of GetNeedBillingStatus
func (*MockStorerMockRecorder) GetPodLister ¶
func (mr *MockStorerMockRecorder) GetPodLister() *gomock.Call
GetPodLister indicates an expected call of GetPodLister
func (*MockStorerMockRecorder) GetTenantEnvResource ¶ added in v1.1.0
func (mr *MockStorerMockRecorder) GetTenantEnvResource(tenantEnvID interface{}) *gomock.Call
GetTenantEnvResource indicates an expected call of GetTenantEnvResource
func (*MockStorerMockRecorder) GetTenantEnvRunningApp ¶ added in v1.1.0
func (mr *MockStorerMockRecorder) GetTenantEnvRunningApp(tenantEnvID interface{}) *gomock.Call
GetTenantEnvRunningApp indicates an expected call of GetTenantEnvRunningApp
func (*MockStorerMockRecorder) InitOneThirdPartService ¶
func (mr *MockStorerMockRecorder) InitOneThirdPartService(service interface{}) *gomock.Call
InitOneThirdPartService indicates an expected call of InitOneThirdPartService
func (*MockStorerMockRecorder) OnDeletes ¶
func (mr *MockStorerMockRecorder) OnDeletes(obj ...interface{}) *gomock.Call
OnDeletes indicates an expected call of OnDeletes
func (*MockStorerMockRecorder) Ready ¶
func (mr *MockStorerMockRecorder) Ready() *gomock.Call
Ready indicates an expected call of Ready
func (*MockStorerMockRecorder) RegistAppService ¶
func (mr *MockStorerMockRecorder) RegistAppService(arg0 interface{}) *gomock.Call
RegistAppService indicates an expected call of RegistAppService
func (*MockStorerMockRecorder) RegistPodUpdateListener ¶
func (mr *MockStorerMockRecorder) RegistPodUpdateListener(arg0, arg1 interface{}) *gomock.Call
RegistPodUpdateListener indicates an expected call of RegistPodUpdateListener
func (*MockStorerMockRecorder) RegisterVolumeTypeListener ¶
func (mr *MockStorerMockRecorder) RegisterVolumeTypeListener(arg0, arg1 interface{}) *gomock.Call
RegisterVolumeTypeListener indicates an expected call of RegisterVolumeTypeListener
func (*MockStorerMockRecorder) Start ¶
func (mr *MockStorerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockStorerMockRecorder) UnRegistPodUpdateListener ¶
func (mr *MockStorerMockRecorder) UnRegistPodUpdateListener(arg0 interface{}) *gomock.Call
UnRegistPodUpdateListener indicates an expected call of UnRegistPodUpdateListener
func (*MockStorerMockRecorder) UnRegisterVolumeTypeListener ¶
func (mr *MockStorerMockRecorder) UnRegisterVolumeTypeListener(arg0 interface{}) *gomock.Call
UnRegisterVolumeTypeListener indicates an expected call of UnRegisterVolumeTypeListener
func (*MockStorerMockRecorder) UpdateGetAppService ¶
func (mr *MockStorerMockRecorder) UpdateGetAppService(serviceID interface{}) *gomock.Call
UpdateGetAppService indicates an expected call of UpdateGetAppService
type NamespaceResource ¶
type NamespaceResource map[string]*v1.PodResource
NamespaceResource namespace resource
func (*NamespaceResource) RemovePod ¶
func (r *NamespaceResource) RemovePod(podName string)
RemovePod remove pod resource
func (*NamespaceResource) SetPodResource ¶
func (r *NamespaceResource) SetPodResource(podName string, pr *v1.PodResource)
SetPodResource set pod resource
type ResourceCache ¶
type ResourceCache struct {
// contains filtered or unexported fields
}
ResourceCache resource cache
func (*ResourceCache) GetAllTenantEnvResource ¶ added in v1.1.0
func (r *ResourceCache) GetAllTenantEnvResource() (trs []TenantEnvResource)
GetAllTenantEnvResource get all tenant env resources
func (*ResourceCache) GetTenantEnvResource ¶ added in v1.1.0
func (r *ResourceCache) GetTenantEnvResource(namespace string) (tr TenantEnvResource)
GetTenantEnvResource get tenant env resource
func (*ResourceCache) RemovePod ¶
func (r *ResourceCache) RemovePod(pod *corev1.Pod)
RemovePod remove pod resource
func (*ResourceCache) SetPodResource ¶
func (r *ResourceCache) SetPodResource(pod *corev1.Pod)
SetPodResource set pod resource
type Storer ¶
type Storer interface { Start() error Ready() bool GetPod(namespace, name string) (*corev1.Pod, error) RegistAppService(*v1.AppService) GetAppService(serviceID string) *v1.AppService UpdateGetAppService(serviceID string) *v1.AppService GetAllAppServices() []*v1.AppService GetAppServiceStatus(serviceID string) string GetAppServiceStatuses(serviceIDs []string) map[string]string GetAppServicesStatus(serviceIDs []string) map[string]string GetTenantEnvResource(tenantEnvID string) TenantEnvResource GetTenantEnvResourceList() []TenantEnvResource GetTenantEnvRunningApp(tenantEnvID string) []*v1.AppService GetNeedBillingStatus(serviceIDs []string) map[string]string OnDeletes(obj ...interface{}) RegistPodUpdateListener(string, chan<- *corev1.Pod) UnRegistPodUpdateListener(string) RegisterVolumeTypeListener(string, chan<- *model.TenantEnvServiceVolumeType) UnRegisterVolumeTypeListener(string) GetCrds() ([]*apiextensions.CustomResourceDefinition, error) GetCrd(name string) (*apiextensions.CustomResourceDefinition, error) GetServiceMonitorClient() (*versioned.Clientset, error) GetAppStatus(appID string) (pb.AppStatus_Status, error) GetAppResources(appID string) (int64, int64, error) GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) ListReplicaSets(namespace string, selector labels.Selector) ([]*appsv1.ReplicaSet, error) ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) Informer() *Informer Lister() *Lister }
Storer app runtime store interface