Documentation ¶
Index ¶
- func SetMetric(set ISetMetric, cnf conf.IServerConf) (enable bool, err error)
- func SetTasks(engine servers.IRegistryEngine, set ITasks, cnf conf.IServerConf, ...) (enable bool, err error)
- type CronResponsiveServer
- func (w *CronResponsiveServer) GetAddress() string
- func (w *CronResponsiveServer) GetServices() map[string][]string
- func (w *CronResponsiveServer) GetStatus() string
- func (w *CronResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
- func (w *CronResponsiveServer) Notify(conf conf.IServerConf) error
- func (w *CronResponsiveServer) Restart(cnf conf.IServerConf) (err error)
- func (w *CronResponsiveServer) Restarted() bool
- func (w *CronResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
- func (w *CronResponsiveServer) Shutdown()
- func (w *CronResponsiveServer) Start() (err error)
- type CronServer
- func (s *CronServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Task)
- func (s *CronServer) GetAddress() string
- func (s *CronServer) GetStatus() string
- func (s *CronServer) Pause()
- func (s *CronServer) Resume() error
- func (s *CronServer) Run() error
- func (s *CronServer) SetMetric(metric *conf.Metric) error
- func (s *CronServer) SetTasks(redisSetting string, tasks []*conf.Task) (err error)
- func (s *CronServer) SetTrace(b bool)
- func (s *CronServer) Shutdown(time.Duration)
- func (s *CronServer) Start() error
- func (s *CronServer) StopMetric() error
- type ISetMetric
- type ITasks
- type Option
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetMetric ¶
func SetMetric(set ISetMetric, cnf conf.IServerConf) (enable bool, err error)
SetMetric 设置metric
func SetTasks ¶
func SetTasks(engine servers.IRegistryEngine, set ITasks, cnf conf.IServerConf, ext map[string]interface{}) (enable bool, err error)
SetTasks 设置tasks
Types ¶
type CronResponsiveServer ¶
CronResponsiveServer rpc 响应式服务器
func NewCronResponsiveServer ¶
func NewCronResponsiveServer(registryAddr string, cnf conf.IServerConf, logger *logger.Logger) (h *CronResponsiveServer, err error)
NewCronResponsiveServer 创建rpc服务器
func (*CronResponsiveServer) GetAddress ¶
func (w *CronResponsiveServer) GetAddress() string
GetAddress 获取服务器地址
func (*CronResponsiveServer) GetServices ¶
func (w *CronResponsiveServer) GetServices() map[string][]string
GetServices 获取服务列表
func (*CronResponsiveServer) GetStatus ¶
func (w *CronResponsiveServer) GetStatus() string
GetStatus 获取当前服务器状态
func (*CronResponsiveServer) NeedRestart ¶
func (w *CronResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
NeedRestart 检查配置判断是否需要重启服务器
func (*CronResponsiveServer) Notify ¶
func (w *CronResponsiveServer) Notify(conf conf.IServerConf) error
Notify 服务器配置变更通知
func (*CronResponsiveServer) Restart ¶
func (w *CronResponsiveServer) Restart(cnf conf.IServerConf) (err error)
Restart 重启服务器
func (*CronResponsiveServer) Restarted ¶
func (w *CronResponsiveServer) Restarted() bool
Restarted 服务器是否已重启
func (*CronResponsiveServer) SetConf ¶
func (w *CronResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
SetConf 设置配置参数
type CronServer ¶
type CronServer struct { *Processor // contains filtered or unexported fields }
CronServer cron服务器
func NewCronServer ¶
func NewCronServer(name string, config string, tasks []*conf.Task, opts ...Option) (t *CronServer, err error)
NewCronServer 创建mqc服务器
func (*CronServer) Dynamic ¶
func (s *CronServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Task)
Dynamic 动态注册或撤销cron任务
func (*CronServer) Run ¶
func (s *CronServer) Run() error
func (*CronServer) SetMetric ¶
func (s *CronServer) SetMetric(metric *conf.Metric) error
SetMetric 重置metric
func (*CronServer) SetTasks ¶
func (s *CronServer) SetTasks(redisSetting string, tasks []*conf.Task) (err error)
SetTasks 设置定时任务
func (*CronServer) Start ¶
func (s *CronServer) Start() error
type ISetMetric ¶
type Option ¶
type Option func(*option)
Option 配置选项
func WithMetric ¶
WithMetric 设置基于influxdb的系统监控组件
type Processor ¶
type Processor struct { *dispatcher.Dispatcher // contains filtered or unexported fields }
Processor 任务处理程序
func NewProcessor ¶
NewProcessor 创建processor
Source Files ¶
Click to show internal directories.
Click to hide internal directories.