rainbond: github.com/goodrain/rainbond/worker/appm/store Index | Files

package store

import "github.com/goodrain/rainbond/worker/appm/store"

Package store is a generated GoMock package.

Index

Package Files

clean.go informer.go lister.go mock_store.go store.go storeage_class.go

type Event Uses

type Event struct {
    Type EventType
    Obj  interface{}
}

Event holds the context of an event.

type EventType Uses

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 Uses

type Informer struct {
    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
}

Informer kube-api client cache

func (*Informer) Ready Uses

func (i *Informer) Ready() bool

Ready if all kube informers is syncd, store is ready

func (*Informer) Start Uses

func (i *Informer) Start(stop chan struct{})

Start statrt

type Lister Uses

type Lister struct {
    Ingress     v1beta1.IngressLister
    Service     corev1.ServiceLister
    Secret      corev1.SecretLister
    StatefulSet appsv1.StatefulSetLister
    Deployment  appsv1.DeploymentLister
    Pod         corev1.PodLister
    ConfigMap   corev1.ConfigMapLister
    Endpoints   corev1.EndpointsLister
    Nodes       corev1.NodeLister
}

Lister kube-api client cache

type MockStorer Uses

type MockStorer struct {
    // contains filtered or unexported fields
}

MockStorer is a mock of Storer interface

func NewMockStorer Uses

func NewMockStorer(ctrl *gomock.Controller) *MockStorer

NewMockStorer creates a new mock instance

func (*MockStorer) EXPECT Uses

func (m *MockStorer) EXPECT() *MockStorerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStorer) GetAllAppServices Uses

func (m *MockStorer) GetAllAppServices() []*v1.AppService

GetAllAppServices mocks base method

func (*MockStorer) GetAppService Uses

func (m *MockStorer) GetAppService(serviceID string) *v1.AppService

GetAppService mocks base method

func (*MockStorer) GetAppServiceStatus Uses

func (m *MockStorer) GetAppServiceStatus(serviceID string) string

GetAppServiceStatus mocks base method

func (*MockStorer) GetAppServicesStatus Uses

func (m *MockStorer) GetAppServicesStatus(serviceIDs []string) map[string]string

GetAppServicesStatus mocks base method

func (*MockStorer) GetNeedBillingStatus Uses

func (m *MockStorer) GetNeedBillingStatus(serviceIDs []string) map[string]string

GetNeedBillingStatus mocks base method

func (*MockStorer) GetPodLister Uses

func (m *MockStorer) GetPodLister() v10.PodLister

GetPodLister mocks base method

func (*MockStorer) GetTenantResource Uses

func (m *MockStorer) GetTenantResource(tenantID string) *v1.TenantResource

GetTenantResource mocks base method

func (*MockStorer) GetTenantRunningApp Uses

func (m *MockStorer) GetTenantRunningApp(tenantID string) []*v1.AppService

GetTenantRunningApp mocks base method

func (*MockStorer) OnDelete Uses

func (m *MockStorer) OnDelete(obj interface{})

OnDelete mocks base method

func (*MockStorer) Ready Uses

func (m *MockStorer) Ready() bool

Ready mocks base method

func (*MockStorer) RegistAppService Uses

func (m *MockStorer) RegistAppService(arg0 *v1.AppService)

RegistAppService mocks base method

func (*MockStorer) Start Uses

func (m *MockStorer) Start() error

Start mocks base method

func (*MockStorer) UpdateGetAppService Uses

func (m *MockStorer) UpdateGetAppService(serviceID string) *v1.AppService

UpdateGetAppService mocks base method

type MockStorerMockRecorder Uses

type MockStorerMockRecorder struct {
    // contains filtered or unexported fields
}

MockStorerMockRecorder is the mock recorder for MockStorer

func (*MockStorerMockRecorder) GetAllAppServices Uses

func (mr *MockStorerMockRecorder) GetAllAppServices() *gomock.Call

GetAllAppServices indicates an expected call of GetAllAppServices

func (*MockStorerMockRecorder) GetAppService Uses

func (mr *MockStorerMockRecorder) GetAppService(serviceID interface{}) *gomock.Call

GetAppService indicates an expected call of GetAppService

func (*MockStorerMockRecorder) GetAppServiceStatus Uses

func (mr *MockStorerMockRecorder) GetAppServiceStatus(serviceID interface{}) *gomock.Call

GetAppServiceStatus indicates an expected call of GetAppServiceStatus

func (*MockStorerMockRecorder) GetAppServicesStatus Uses

func (mr *MockStorerMockRecorder) GetAppServicesStatus(serviceIDs interface{}) *gomock.Call

GetAppServicesStatus indicates an expected call of GetAppServicesStatus

func (*MockStorerMockRecorder) GetNeedBillingStatus Uses

func (mr *MockStorerMockRecorder) GetNeedBillingStatus(serviceIDs interface{}) *gomock.Call

GetNeedBillingStatus indicates an expected call of GetNeedBillingStatus

func (*MockStorerMockRecorder) GetPodLister Uses

func (mr *MockStorerMockRecorder) GetPodLister() *gomock.Call

GetPodLister indicates an expected call of GetPodLister

func (*MockStorerMockRecorder) GetTenantResource Uses

func (mr *MockStorerMockRecorder) GetTenantResource(tenantID interface{}) *gomock.Call

GetTenantResource indicates an expected call of GetTenantResource

func (*MockStorerMockRecorder) GetTenantRunningApp Uses

func (mr *MockStorerMockRecorder) GetTenantRunningApp(tenantID interface{}) *gomock.Call

GetTenantRunningApp indicates an expected call of GetTenantRunningApp

func (*MockStorerMockRecorder) OnDelete Uses

func (mr *MockStorerMockRecorder) OnDelete(obj interface{}) *gomock.Call

OnDelete indicates an expected call of OnDelete

func (*MockStorerMockRecorder) Ready Uses

func (mr *MockStorerMockRecorder) Ready() *gomock.Call

Ready indicates an expected call of Ready

func (*MockStorerMockRecorder) RegistAppService Uses

func (mr *MockStorerMockRecorder) RegistAppService(arg0 interface{}) *gomock.Call

RegistAppService indicates an expected call of RegistAppService

func (*MockStorerMockRecorder) Start Uses

func (mr *MockStorerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start

func (*MockStorerMockRecorder) UpdateGetAppService Uses

func (mr *MockStorerMockRecorder) UpdateGetAppService(serviceID interface{}) *gomock.Call

UpdateGetAppService indicates an expected call of UpdateGetAppService

type ProbeInfo Uses

type ProbeInfo struct {
    Sid  string `json:"sid"`
    UUID string `json:"uuid"`
    IP   string `json:"ip"`
    Port int32  `json:"port"`
}

ProbeInfo holds the context of a probe.

type Storer Uses

type Storer interface {
    Start() error
    Ready() bool
    RegistAppService(*v1.AppService)
    GetAppService(serviceID string) *v1.AppService
    UpdateGetAppService(serviceID string) *v1.AppService
    GetAllAppServices() []*v1.AppService
    GetAppServiceStatus(serviceID string) string
    GetAppServicesStatus(serviceIDs []string) map[string]string
    GetTenantResource(tenantID string) *v1.TenantResource
    GetTenantRunningApp(tenantID string) []*v1.AppService
    GetNeedBillingStatus(serviceIDs []string) map[string]string
    OnDelete(obj interface{})
    GetPodLister() listcorev1.PodLister
    RegistPodUpdateListener(string, chan<- *corev1.Pod)
    UnRegistPodUpdateListener(string)
}

Storer app runtime store interface

func NewStore Uses

func NewStore(clientset *kubernetes.Clientset,
    dbmanager db.Manager,
    conf option.Config,
    startCh *channels.RingChannel,
    probeCh *channels.RingChannel) Storer

NewStore new app runtime store

Package store imports 30 packages (graph) and is imported by 11 packages. Updated 2019-09-18. Refresh now. Tools for package owners.