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 ISetMetric
- type ITasks
- type OnceResponsiveServer
- func (w *OnceResponsiveServer) GetAddress() string
- func (w *OnceResponsiveServer) GetServices() map[string][]string
- func (w *OnceResponsiveServer) GetStatus() string
- func (w *OnceResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
- func (w *OnceResponsiveServer) Notify(conf conf.IServerConf) error
- func (w *OnceResponsiveServer) Restart(cnf conf.IServerConf) (err error)
- func (w *OnceResponsiveServer) Restarted() bool
- func (w *OnceResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
- func (w *OnceResponsiveServer) SetPb(func(component.IContainer, *grpc.Server))
- func (w *OnceResponsiveServer) Shutdown()
- func (w *OnceResponsiveServer) Start() (err error)
- type OnceServer
- func (s *OnceServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Task)
- func (s *OnceServer) GetAddress() string
- func (s *OnceServer) GetStatus() string
- func (s *OnceServer) Pause()
- func (s *OnceServer) Resume() error
- func (s *OnceServer) Run() error
- func (s *OnceServer) SetMetric(metric *conf.Metric) error
- func (s *OnceServer) SetTasks(redisSetting string, tasks []*conf.Task) (err error)
- func (s *OnceServer) SetTrace(b bool)
- func (s *OnceServer) Shutdown(time.Duration)
- func (s *OnceServer) Start() error
- func (s *OnceServer) StopMetric() error
- 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 ISetMetric ¶
type OnceResponsiveServer ¶
func NewOnceResponsiveServer ¶
func NewOnceResponsiveServer(registryAddr string, cnf conf.IServerConf, logger *logger.Logger) (h *OnceResponsiveServer, err error)
NewCronResponsiveServer 创建rpc服务器
func (*OnceResponsiveServer) GetAddress ¶
func (w *OnceResponsiveServer) GetAddress() string
GetAddress 获取服务器地址
func (*OnceResponsiveServer) GetServices ¶
func (w *OnceResponsiveServer) GetServices() map[string][]string
GetServices 获取服务列表
func (*OnceResponsiveServer) GetStatus ¶
func (w *OnceResponsiveServer) GetStatus() string
GetStatus 获取当前服务器状态
func (*OnceResponsiveServer) NeedRestart ¶
func (w *OnceResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
NeedRestart 检查配置判断是否需要重启服务器
func (*OnceResponsiveServer) Notify ¶
func (w *OnceResponsiveServer) Notify(conf conf.IServerConf) error
Notify 服务器配置变更通知
func (*OnceResponsiveServer) Restart ¶
func (w *OnceResponsiveServer) Restart(cnf conf.IServerConf) (err error)
Restart 重启服务器
func (*OnceResponsiveServer) Restarted ¶
func (w *OnceResponsiveServer) Restarted() bool
Restarted 服务器是否已重启
func (*OnceResponsiveServer) SetConf ¶
func (w *OnceResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
SetConf 设置配置参数
func (*OnceResponsiveServer) SetPb ¶
func (w *OnceResponsiveServer) SetPb(func(component.IContainer, *grpc.Server))
type OnceServer ¶
type OnceServer struct { *Processor // contains filtered or unexported fields }
func NewCronServer ¶
func NewCronServer(name string, config string, tasks []*conf.Task, opts ...Option) (t *OnceServer, err error)
NewCronServer 创建mqc服务器
func (*OnceServer) Dynamic ¶
func (s *OnceServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Task)
Dynamic 动态注册或撤销cron任务
func (*OnceServer) Run ¶
func (s *OnceServer) Run() error
func (*OnceServer) SetMetric ¶
func (s *OnceServer) SetMetric(metric *conf.Metric) error
SetMetric 重置metric
func (*OnceServer) SetTasks ¶
func (s *OnceServer) SetTasks(redisSetting string, tasks []*conf.Task) (err error)
SetTasks 设置定时任务
func (*OnceServer) Start ¶
func (s *OnceServer) Start() error
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.