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

package store

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


Package Files

clean.go informer.go lister.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 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
    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

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 27 packages (graph) and is imported by 10 packages. Updated 2019-06-19. Refresh now. Tools for package owners.