Versions in this module Expand all Collapse all v1 v1.19.1 Oct 25, 2022 Changes in this version + const DATA_CHECK_INTERVAL + const DeleteApplicationType + const LaunchApplicationType + const LaunchTaskgroupType + const MAX_DATA_UPDATE_INTERVAL + const MAX_STAGING_UPDATE_INTERVAL + const MESOS_HEARTBEAT_TIMEOUT + const MaxEventQueueLength + const RescheduleTaskgroupType + const RollingupdateApplicationType + const ScaleApplicationType + const ScaleTaskgroupType + const SchedulerRoleMaster + const SchedulerRoleSlave + const TRANSACTION_APPLICATION_LAUNCH_LIFEPERIOD + const TRANSACTION_DEFAULT_LIFEPERIOD + const TRANSACTION_DEPLOYMENT_INNERDELETE_LIFEPERIOD + const TRANSACTION_DEPLOYMENT_ROLLING_DOWN_LIFEPERIOD + const TRANSACTION_DEPLOYMENT_ROLLING_UP_LIFEPERIOD + const TRANSACTION_INNER_RESCHEDULE_LIFEPERIOD + const TRANSACTION_RESCHEDULE_RESET_INTERVAL + const UpdateApplicationType + const UpdateTaskgroupType + var OperateAppLatencySecond = prometheus.NewHistogramVec(prometheus.HistogramOpts{ ... }, []string{ ... }) + var OperateAppTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var ScheduleTaskgroupLatencyMs = prometheus.NewHistogramVec(prometheus.HistogramOpts{ ... }, []string{ ... }) + var ScheduleTaskgroupTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var TaskgroupOomTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var TaskgroupReportTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + func DataCheckManage(mgr *DataCheckMgr, doRecover bool) + type DataCheckMgr struct + func CreateDataCheckMgr(store store.Store, s *Scheduler) (*DataCheckMgr, error) + func (mgr *DataCheckMgr) SendMsg(msg *DataCheckMsg) error + type DataCheckMsg struct + MsgType string + type Scheduler struct + BcsClusterId string + ClusterId string + IP string + Memsoses []*commtype.MesosServInfo + Port int + Role string + Schedulers []*commtype.SchedulerServInfo + ServiceMgr *ServiceMgr + func NewScheduler(config util.Scheduler, store store.Store) *Scheduler + func (s *Scheduler) BuildTaskGroup(version *types.Version, app *types.Application, ID string, reason string) (*types.TaskGroup, error) + func (s *Scheduler) CheckPodBelongDaemonset(taskgroupId string) bool + func (s *Scheduler) DeclineOffers(offers []*mesos.Offer) error + func (s *Scheduler) DeclineResource(offerId *string) (*http.Response, error) + func (s *Scheduler) DeleteDaemonsetTaskGroup(daemon *types.BcsDaemonset, taskGroup *types.TaskGroup) + func (s *Scheduler) DeleteTaskGroup(app *types.Application, taskGroup *types.TaskGroup, reason string) error + func (s *Scheduler) DeploymentCheck(ns string, name string, recover bool) + func (s *Scheduler) FetchAgentSchedInfo(hostname string) (*types.AgentSchedInfo, error) + func (s *Scheduler) FetchAgentSetting(ip string) (*commtype.BcsClusterAgentSetting, error) + func (s *Scheduler) FetchTaskGroup(taskGroupID string) (*types.TaskGroup, error) + func (s *Scheduler) FinishTransaction(transaction *Transaction) + func (s *Scheduler) GetAllOffers() []*offer.Offer + func (s *Scheduler) GetClusterId() string + func (s *Scheduler) GetClusterResource() (*commtype.BcsClusterResource, error) + func (s *Scheduler) GetCurrentOffers() []*mesos.Offer + func (s *Scheduler) GetFirstOffer() *offer.Offer + func (s *Scheduler) GetHostAttributes(para *typesplugin.HostPluginParameter) (map[string]*typesplugin.HostAttributes, error) + func (s *Scheduler) GetMesosResourceIn(mesosClient *client.Client) (*commtype.BcsClusterResource, error) + func (s *Scheduler) GetNextOffer(offer *offer.Offer) *offer.Offer + func (s *Scheduler) HealthyReport(healthyResult *bcstype.HealthCheckResult) + func (s *Scheduler) InnerDeleteApplication(runAs, appId string, enforce bool) error + func (s *Scheduler) IsConstraintsFit(version *types.Version, offer *mesos.Offer, taskgroupID string) bool + func (s *Scheduler) IsOfferExtendedResourcesFitLaunch(needs map[string]*bcstype.ExtendedResource, outOffer *offer.Offer) bool + func (s *Scheduler) IsOfferResourceFitLaunch(needResource *types.Resource, outOffer *offer.Offer) bool + func (s *Scheduler) IsOfferResourceFitUpdate(needResource *types.Resource, outOffer *offer.Offer) bool + func (s *Scheduler) KillExecutor(agentId, executerId string) (*http.Response, error) + func (s *Scheduler) KillTaskGroup(taskGroup *types.TaskGroup) (*http.Response, error) + func (s *Scheduler) LaunchTaskGroup(offer *mesos.Offer, taskGroup *mesos.TaskGroupInfo, version *types.Version) (*http.Response, error) + func (s *Scheduler) LaunchTaskGroups(offer *mesos.Offer, taskGroups []*mesos.TaskGroupInfo, version *types.Version) (*http.Response, error) + func (s *Scheduler) OfferedResources(offer *mesos.Offer) (cpus, mem, disk float64) + func (s *Scheduler) ProcessCommandMessage(bcsMsg *types.BcsMessage) + func (s *Scheduler) RunCommand(command *commtypes.BcsCommandInfo) + func (s *Scheduler) RunDeleteApplication(transaction *Transaction) + func (s *Scheduler) RunInnerScaleApplication(transaction *Transaction) + func (s *Scheduler) RunLaunchApplication(transaction *Transaction) + func (s *Scheduler) RunRescheduleTaskgroup(transaction *Transaction) + func (s *Scheduler) RunScaleApplication(transaction *Transaction) + func (s *Scheduler) RunUpdateApplication(transaction *Transaction) + func (s *Scheduler) RunUpdateApplicationResource(transaction *Transaction) + func (s *Scheduler) SendBcsMessage(taskGroup *types.TaskGroup, bcsMsg *types.BcsMessage) (*types.BcsMessage, error) + func (s *Scheduler) SendEnv(taskGroup *types.TaskGroup, name, value string) (*types.BcsMessage, error) + func (s *Scheduler) SendHealthMsg(kind alarm.MessageKind, RunAs, message string, alarmID string, ...) + func (s *Scheduler) SendLocalFile(taskGroup *types.TaskGroup, ctxBase64, to, right, user string) (*types.BcsMessage, error) + func (s *Scheduler) SendMessage(taskGroup *types.TaskGroup, msg []byte) (*http.Response, error) + func (s *Scheduler) SendRemoteFile(taskGroup *types.TaskGroup, from, to, right, user string) (*types.BcsMessage, error) + func (s *Scheduler) SendSignal(taskGroup *types.TaskGroup, signal uint32) (*types.BcsMessage, error) + func (s *Scheduler) Start() error + func (s *Scheduler) StatusReport(status *mesos.TaskStatus) + func (s *Scheduler) Stop() + func (s *Scheduler) UpdateAgentSchedInfo(hostname, taskGroupID string, deltaResource *types.Resource) error + func (s *Scheduler) UpdateMesosAgents() + func (s *Scheduler) UpdateTaskStatus(agentID, executorID string, bcsMsg *types.BcsMessage) + func (s *Scheduler) UseOffer(o *offer.Offer) bool + type ServiceMgr struct + func NewServiceMgr(scheduler *Scheduler) *ServiceMgr + func (mgr *ServiceMgr) SendMsg(msg *ServiceMgrMsg) error + func (mgr *ServiceMgr) ServiceAdd(service *commtypes.BcsService) + func (mgr *ServiceMgr) ServiceDelete(service *commtypes.BcsService) + func (mgr *ServiceMgr) ServiceUpdate(service *commtypes.BcsService) + func (mgr *ServiceMgr) TaskgroupAdd(taskgroup *types.TaskGroup) + func (mgr *ServiceMgr) TaskgroupDelete(taskgroup *types.TaskGroup) + func (mgr *ServiceMgr) TaskgroupUpdate(taskgroup *types.TaskGroup) + func (mgr *ServiceMgr) Worker() + type ServiceMgrMsg struct + MsgType string + type ServiceSyncData struct + Action string + DataType string + Item interface{} + type TransAPIDeleteOpdata struct + Enforce bool + type TransAPILaunchOpdata struct + LaunchedNum int + NeedResource *types.Resource + Reason string + Version *types.Version + type TransAPIScaleOpdata struct + Instances uint64 + IsDown bool + LaunchedNum int + NeedResource *types.Resource + Version *types.Version + type TransAPIUpdateOpdata struct + Instances int + LaunchedNum int + NeedResource *types.Resource + Taskgroups []*types.TaskGroup + Version *types.Version + type TransRescheduleOpData struct + Force bool + HostRetain string + HostRetainTime int64 + IsInner bool + NeedResource *types.Resource + TaskGroupID string + Version *types.Version + type Transaction struct + AppID string + CreateTime int64 + DelayTime int64 + ID string + LifePeriod int64 + OpData interface{} + OpType string + RunAs string + Status string + func CreateTransaction() *Transaction