Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { //服务名称 Name string `properties:"brian.http.server.name"` Host string `properties:"brian.http.server.host"` Port int `properties:"brian.http.server.port"` Debug bool `properties:"brian.http.server.debug"` DisableMetric bool `properties:"brian.http.server.DisableMetric"` DisableTrace bool `properties:"brian.http.server.DisableTrace"` Weight float64 `properties:"brian.http.server.registry.weight"` SlowQueryThresholdInMilli int64 `properties:"brian.http.server.timeout"` // contains filtered or unexported fields }
HTTP config
func (*Config) WithLogger ¶
修改日志配置 ...
type Controller ¶
type Controller interface { //controller的注册方法实现往服务中注册函数 Register(server *Server) }
服务处理的controller接口
type Server ¶
type Server struct { *echo.Echo Config *Config // contains filtered or unexported fields }
http Server struct
func (*Server) GracefulStop ¶
GracefulStop implements server.Server interface it will stop echo server gracefully 优雅的停止服务,服务接口 将优雅的停止echo服务
func (*Server) Info ¶
func (s *Server) Info(group, cluster string) *server.ServiceInfo
Info returns server info, used by governor and consumer balancer 初始化服务信息
Click to show internal directories.
Click to hide internal directories.