Documentation ¶
Index ¶
- Variables
- func GenerateRandnum() int
- func NewEtcdCluster(cfg *types.CmdConfig, st storage.Storage, netservice *service.InnerService) cluster.Cluster
- type AppWatch
- type ConfigMapInfo
- type ConfigMapWatch
- type DeploymentInfo
- type DeploymentWatch
- func (watch *DeploymentWatch) AddEvent(obj interface{})
- func (watch *DeploymentWatch) DeleteEvent(obj interface{})
- func (watch *DeploymentWatch) GetDeploymentChannel(deployment *schedulertypes.Deployment) string
- func (watch *DeploymentWatch) ProcessAllDeployments() error
- func (watch *DeploymentWatch) UpdateEvent(old, cur interface{})
- func (watch *DeploymentWatch) Work()
- type EndpointInfo
- type EndpointWatch
- type EtcdCluster
- type ExportServiceInfo
- type ExportServiceWatch
- func (watch *ExportServiceWatch) AddEvent(obj interface{})
- func (watch *ExportServiceWatch) DeleteEvent(obj interface{})
- func (watch *ExportServiceWatch) GetExportserviceChannel(exportservice *lbtypes.ExportService) string
- func (watch *ExportServiceWatch) SyncEpTaskgroupBackend(esInfo *ExportServiceInfo, taskgroup *schedtypes.TaskGroup) error
- func (watch *ExportServiceWatch) SyncExportServiceBackends(esInfo *ExportServiceInfo) error
- func (watch *ExportServiceWatch) UpdateEvent(obj interface{})
- type NSControlInfo
- type NetServiceWatcher
- type SecretInfo
- type SecretWatch
- type ServiceInfo
- type ServiceWatch
- type TaskControlInfo
- type TaskGroupWatch
- func (task *TaskGroupWatch) AddEvent(obj interface{})
- func (task *TaskGroupWatch) DeleteEvent(obj interface{})
- func (task *TaskGroupWatch) GetTaskGroupChannel(taskGroup *schedulertypes.TaskGroup) string
- func (task *TaskGroupWatch) GetTaskGroupChannelV2(taskGroup *schedulertypes.TaskGroup) string
- func (task *TaskGroupWatch) UpdateEvent(old, cur interface{}, force bool)
- func (task *TaskGroupWatch) Work()
Constants ¶
This section is empty.
Variables ¶
var ( //ApplicationThreadNum goroutine number for Application channel ApplicationThreadNum int //TaskgroupThreadNum goroutine number for taskgroup channel TaskgroupThreadNum int //ExportserviceThreadNum goroutine number for exportservice channel ExportserviceThreadNum int DeploymentThreadNum int )
Functions ¶
func NewEtcdCluster ¶
func NewEtcdCluster(cfg *types.CmdConfig, st storage.Storage, netservice *service.InnerService) cluster.Cluster
NewEtcdCluster create mesos cluster
Types ¶
type AppWatch ¶
type AppWatch struct {
// contains filtered or unexported fields
}
AppWatch for app data in zookeeper, app wath is base on namespace. AppWatch will record all namespace path,
func NewAppWatch ¶
func NewAppWatch(cxt context.Context, informer bkbcsv2.ApplicationInformer, reporter cluster.Reporter) *AppWatch
NewAppWatch return a new application watch
func (*AppWatch) AddEvent ¶
func (app *AppWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*AppWatch) DeleteEvent ¶
func (app *AppWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*AppWatch) GetApplicationChannel ¶
func (app *AppWatch) GetApplicationChannel(application *schedulertypes.Application) string
GetApplicationChannel get distribution channel for Application
func (*AppWatch) UpdateEvent ¶
UpdateEvent when update
type ConfigMapInfo ¶
type ConfigMapInfo struct {
// contains filtered or unexported fields
}
ConfigMapInfo wrapper for BCS ConfigMap
type ConfigMapWatch ¶
type ConfigMapWatch struct {
// contains filtered or unexported fields
}
ConfigMapWatch watch for configmap, watch all detail and store to local cache
func NewConfigMapWatch ¶
func NewConfigMapWatch(cxt context.Context, informer bkbcsv2.BcsConfigMapInformer, reporter cluster.Reporter) *ConfigMapWatch
NewConfigMapWatch create watch for BCS ConfigMap
func (*ConfigMapWatch) AddEvent ¶
func (watch *ConfigMapWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*ConfigMapWatch) DeleteEvent ¶
func (watch *ConfigMapWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*ConfigMapWatch) ProcessAllConfigmaps ¶
func (watch *ConfigMapWatch) ProcessAllConfigmaps() error
ProcessAllConfigmaps handle all configmap under all namespace
func (*ConfigMapWatch) UpdateEvent ¶
func (watch *ConfigMapWatch) UpdateEvent(old, cur interface{})
UpdateEvent when update
type DeploymentInfo ¶
type DeploymentInfo struct {
// contains filtered or unexported fields
}
DeploymentInfo wrapper for BCS Deployment
type DeploymentWatch ¶
type DeploymentWatch struct {
// contains filtered or unexported fields
}
DeploymentWatch watch all deployment data and store to local cache
func NewDeploymentWatch ¶
func NewDeploymentWatch(cxt context.Context, informer bkbcsv2.DeploymentInformer, reporter cluster.Reporter) *DeploymentWatch
NewDeploymentWatch create deployment watch
func (*DeploymentWatch) AddEvent ¶
func (watch *DeploymentWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*DeploymentWatch) DeleteEvent ¶
func (watch *DeploymentWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*DeploymentWatch) GetDeploymentChannel ¶
func (watch *DeploymentWatch) GetDeploymentChannel(deployment *schedulertypes.Deployment) string
func (*DeploymentWatch) ProcessAllDeployments ¶
func (watch *DeploymentWatch) ProcessAllDeployments() error
ProcessAllDeployments handle all namespace deployment data
func (*DeploymentWatch) UpdateEvent ¶
func (watch *DeploymentWatch) UpdateEvent(old, cur interface{})
UpdateEvent when update
type EndpointInfo ¶
type EndpointInfo struct {
// contains filtered or unexported fields
}
EndpointInfo wrapper for BCSEndpoint
type EndpointWatch ¶
type EndpointWatch struct {
// contains filtered or unexported fields
}
EndpointWatch watch for Endpoint and store all datas to local cache
func NewEndpointWatch ¶
func NewEndpointWatch(cxt context.Context, informer bkbcsv2.BcsEndpointInformer, reporter cluster.Reporter) *EndpointWatch
NewEndpointWatch create endpoint watch
func (*EndpointWatch) AddEvent ¶
func (watch *EndpointWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*EndpointWatch) DeleteEvent ¶
func (watch *EndpointWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*EndpointWatch) ProcessAllEndpoints ¶
func (watch *EndpointWatch) ProcessAllEndpoints() error
ProcessAllEndpoints handle all namespace Endpoint data
func (*EndpointWatch) UpdateEvent ¶
func (watch *EndpointWatch) UpdateEvent(old, cur interface{})
UpdateEvent when update
func (*EndpointWatch) Work ¶
func (watch *EndpointWatch) Work()
Work handle all Endpoint datas periodically
type EtcdCluster ¶
type EtcdCluster struct { Status string //curr status // contains filtered or unexported fields }
EtcdCluster cluster implements all cluster interface
func (*EtcdCluster) GetClusterStatus ¶
func (ms *EtcdCluster) GetClusterStatus() string
GetClusterStatus get synchronization status
func (*EtcdCluster) ReportData ¶
func (ms *EtcdCluster) ReportData(data *types.BcsSyncData) error
ReportData report data to reportHandler, handle all data independently
func (*EtcdCluster) Sync ¶
func (ms *EtcdCluster) Sync(tp string) error
Sync ask cluster to sync data to local cache
type ExportServiceInfo ¶
type ExportServiceInfo struct {
// contains filtered or unexported fields
}
ExportServiceInfo wrapper for ServiceInfo
type ExportServiceWatch ¶
type ExportServiceWatch struct { ClusterID string // contains filtered or unexported fields }
ExportServiceWatch watch for taskGroup
func NewExportServiceWatch ¶
func NewExportServiceWatch(cxt context.Context, factory informers.SharedInformerFactory, reporter cluster.Reporter, clusterID string) *ExportServiceWatch
NewExportServiceWatch create export service watch
func (*ExportServiceWatch) AddEvent ¶
func (watch *ExportServiceWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*ExportServiceWatch) DeleteEvent ¶
func (watch *ExportServiceWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*ExportServiceWatch) GetExportserviceChannel ¶
func (watch *ExportServiceWatch) GetExportserviceChannel(exportservice *lbtypes.ExportService) string
GetExportserviceChannel get channel for dispatch
func (*ExportServiceWatch) SyncEpTaskgroupBackend ¶
func (watch *ExportServiceWatch) SyncEpTaskgroupBackend(esInfo *ExportServiceInfo, taskgroup *schedtypes.TaskGroup) error
SyncEpTaskgroupBackend convert taskgroup to exportservice endpoint
func (*ExportServiceWatch) SyncExportServiceBackends ¶
func (watch *ExportServiceWatch) SyncExportServiceBackends(esInfo *ExportServiceInfo) error
SyncExportServiceBackends export service backend synchronization
func (*ExportServiceWatch) UpdateEvent ¶
func (watch *ExportServiceWatch) UpdateEvent(obj interface{})
UpdateEvent when update
type NSControlInfo ¶
type NSControlInfo struct {
// contains filtered or unexported fields
}
NSControlInfo store all app info under one namespace
type NetServiceWatcher ¶
type NetServiceWatcher struct {
// contains filtered or unexported fields
}
NetServiceWatcher watchs resources in netservice, and sync to storage.
func NewNetServiceWatcher ¶
func NewNetServiceWatcher(clusterID string, reporter cluster.Reporter, netservice *service.InnerService) *NetServiceWatcher
NewNetServiceWatcher return a new netservice watcher.
func (*NetServiceWatcher) Run ¶
func (w *NetServiceWatcher) Run(stopCh <-chan struct{})
Run starts the netservice watcher.
func (*NetServiceWatcher) SyncIPResource ¶
func (w *NetServiceWatcher) SyncIPResource()
SyncIPResource syncs target ip resources to storages.
func (*NetServiceWatcher) SyncIPResourceDetail ¶
func (w *NetServiceWatcher) SyncIPResourceDetail()
SyncIPResourceDetail sync target ip resource detail to storages.
type SecretInfo ¶
type SecretInfo struct {
// contains filtered or unexported fields
}
SecretInfo wrapper for BCSSecret
type SecretWatch ¶
type SecretWatch struct {
// contains filtered or unexported fields
}
SecretWatch watch all secret data and store in local cache
func NewSecretWatch ¶
func NewSecretWatch(cxt context.Context, informer bkbcsv2.BcsSecretInformer, reporter cluster.Reporter) *SecretWatch
NewSecretWatch create SecretWatch for data synchronization
func (*SecretWatch) AddEvent ¶
func (watch *SecretWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*SecretWatch) DeleteEvent ¶
func (watch *SecretWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*SecretWatch) ProcessAllSecrets ¶
func (watch *SecretWatch) ProcessAllSecrets() error
ProcessAllSecrets handle all namespaces data
func (*SecretWatch) UpdateEvent ¶
func (watch *SecretWatch) UpdateEvent(old, cur interface{})
UpdateEvent when update
func (*SecretWatch) Work ¶
func (watch *SecretWatch) Work()
Work list all namespace secret periodically
type ServiceInfo ¶
type ServiceInfo struct {
// contains filtered or unexported fields
}
ServiceInfo wrapper for BCSService
type ServiceWatch ¶
type ServiceWatch struct {
// contains filtered or unexported fields
}
ServiceWatch watch all event for Service and store in local cache
func NewServiceWatch ¶
func NewServiceWatch(cxt context.Context, informer bkbcsv2.BcsServiceInformer, reporter cluster.Reporter) *ServiceWatch
NewServiceWatch create watch for Service
func (*ServiceWatch) AddEvent ¶
func (watch *ServiceWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*ServiceWatch) DeleteEvent ¶
func (watch *ServiceWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*ServiceWatch) ProcessAllServices ¶
func (watch *ServiceWatch) ProcessAllServices() error
ProcessAllServices handle all namespace service
func (*ServiceWatch) UpdateEvent ¶
func (watch *ServiceWatch) UpdateEvent(old, cur interface{})
UpdateEvent when update
func (*ServiceWatch) Work ¶
func (watch *ServiceWatch) Work()
Work list all Service data periodically
type TaskControlInfo ¶
type TaskControlInfo struct {
// contains filtered or unexported fields
}
TaskControlInfo store all task info under one namespace
type TaskGroupWatch ¶
type TaskGroupWatch struct {
// contains filtered or unexported fields
}
TaskGroupWatch watch for taskGroup
func NewTaskGroupWatch ¶
func NewTaskGroupWatch(cxt context.Context, informer bkbcsv2.TaskGroupInformer, reporter cluster.Reporter) *TaskGroupWatch
NewTaskGroupWatch create default taskgroup watch
func (*TaskGroupWatch) AddEvent ¶
func (task *TaskGroupWatch) AddEvent(obj interface{})
AddEvent call when data added
func (*TaskGroupWatch) DeleteEvent ¶
func (task *TaskGroupWatch) DeleteEvent(obj interface{})
DeleteEvent when delete
func (*TaskGroupWatch) GetTaskGroupChannel ¶
func (task *TaskGroupWatch) GetTaskGroupChannel(taskGroup *schedulertypes.TaskGroup) string
GetTaskGroupChannel get taskgroup dispatch channel
func (*TaskGroupWatch) GetTaskGroupChannelV2 ¶
func (task *TaskGroupWatch) GetTaskGroupChannelV2(taskGroup *schedulertypes.TaskGroup) string
GetTaskGroupChannelV2 get taskgroup dispatch channel
func (*TaskGroupWatch) UpdateEvent ¶
func (task *TaskGroupWatch) UpdateEvent(old, cur interface{}, force bool)
UpdateEvent when update