Documentation ¶
Index ¶
- func SetMetric(set ISetMetric, cnf conf.IServerConf) (enable bool, err error)
- func SetQueues(engine servers.IRegistryEngine, set IQueues, cnf conf.IServerConf, ...) (enable bool, err error)
- type IQueues
- type ISetMetric
- type MqcResponsiveServer
- func (w *MqcResponsiveServer) GetAddress() string
- func (w *MqcResponsiveServer) GetServices() map[string][]string
- func (w *MqcResponsiveServer) GetStatus() string
- func (w *MqcResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
- func (w *MqcResponsiveServer) Notify(nConf conf.IServerConf) error
- func (w *MqcResponsiveServer) Restart(cnf conf.IServerConf) (err error)
- func (w *MqcResponsiveServer) Restarted() bool
- func (w *MqcResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
- func (w *MqcResponsiveServer) Shutdown()
- func (w *MqcResponsiveServer) Start() (err error)
- type MqcServer
- func (s *MqcServer) AddRouters(p *Processor)
- func (s *MqcServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Queue)
- func (s *MqcServer) GetAddress() string
- func (s *MqcServer) GetStatus() string
- func (s *MqcServer) Pause(timeout time.Duration)
- func (s *MqcServer) Run() error
- func (s *MqcServer) SetMetric(metric *conf.Metric) error
- func (s *MqcServer) SetQueues(proto string, raw string, queues []*conf.Queue) (err error)
- func (s *MqcServer) SetTrace(b bool)
- func (s *MqcServer) Shutdown(timeout time.Duration)
- func (s *MqcServer) StopMetric() error
- type Option
- func WithIP(ip string) Option
- func WithLogger(logger *logger.Logger) Option
- func WithMetric(host string, dataBase string, userName string, password string, cron string) Option
- func WithName(platName string, systemName string, clusterName string, serverType string) Option
- func WithShowTrace(b bool) 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 SetQueues ¶
func SetQueues(engine servers.IRegistryEngine, set IQueues, cnf conf.IServerConf, ext map[string]interface{}) (enable bool, err error)
SetQueues 设置queue
Types ¶
type ISetMetric ¶
type MqcResponsiveServer ¶
MqcResponsiveServer rpc 响应式服务器
func NewMqcResponsiveServer ¶
func NewMqcResponsiveServer(registryAddr string, cnf conf.IServerConf, logger *logger.Logger) (h *MqcResponsiveServer, err error)
NewMqcResponsiveServer 创建mqc服务器
func (*MqcResponsiveServer) GetAddress ¶
func (w *MqcResponsiveServer) GetAddress() string
GetAddress 获取服务器地址
func (*MqcResponsiveServer) GetServices ¶
func (w *MqcResponsiveServer) GetServices() map[string][]string
GetServices 获取服务列表
func (*MqcResponsiveServer) GetStatus ¶
func (w *MqcResponsiveServer) GetStatus() string
GetStatus 获取当前服务器状态
func (*MqcResponsiveServer) NeedRestart ¶
func (w *MqcResponsiveServer) NeedRestart(cnf conf.IServerConf) (bool, error)
NeedRestart 检查配置判断是否需要重启服务器
func (*MqcResponsiveServer) Notify ¶
func (w *MqcResponsiveServer) Notify(nConf conf.IServerConf) error
Notify 服务器配置变更通知
func (*MqcResponsiveServer) Restart ¶
func (w *MqcResponsiveServer) Restart(cnf conf.IServerConf) (err error)
Restart 重启服务器
func (*MqcResponsiveServer) Restarted ¶
func (w *MqcResponsiveServer) Restarted() bool
Restarted 服务器是否已重启
func (*MqcResponsiveServer) SetConf ¶
func (w *MqcResponsiveServer) SetConf(restart bool, conf conf.IServerConf) (err error)
SetConf 设置配置参数
type MqcServer ¶
type MqcServer struct { *Processor // contains filtered or unexported fields }
MqcServer mqc服务器
func NewMqcServer ¶
func NewMqcServer(name string, proto string, config string, queues []*conf.Queue, opts ...Option) (t *MqcServer, err error)
NewMqcServer 创建mqc服务器
func (*MqcServer) AddRouters ¶
func (*MqcServer) Dynamic ¶
func (s *MqcServer) Dynamic(engine servers.IRegistryEngine, c chan *conf.Queue)
Dynamic 动态注册或撤销消息队列
type Option ¶
type Option func(*option)
Option 配置选项
func WithMetric ¶
WithMetric 设置基于influxdb的系统监控组件
type Processor ¶
type Processor struct { *dispatcher.Dispatcher mq.MQConsumer // contains filtered or unexported fields }
func NewProcessor ¶
NewProcessor 创建processor
Click to show internal directories.
Click to hide internal directories.