Documentation
¶
Index ¶
- type Server
- func (svr *Server) ChangeStatus(code int, message string)
- func (svr *Server) Check(failFunc func(*Server, logs.Info) string, ...) (info logs.Info)
- func (svr *Server) ParseFromConfig(conf map[string]string)
- func (svr *Server) ReExec(afunc func(*Server, logs.Info) string, info logs.Info)
- func (svr *Server) TryConnect() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
Name string
Host string
Port string
Mode string
Timeout int
Conn net.Conn
ReExecTime int
Status struct {
Code int // 0是过程出错, 1是正常, 2是异常
Message string
LastChange time.Time
NeedExec bool
}
}
Server 服务器结构体
func (*Server) ChangeStatus ¶
func (*Server) ParseFromConfig ¶
ParseFromConfig 写入配置并赋初值
Click to show internal directories.
Click to hide internal directories.