Versions in this module Expand all Collapse all v0 v0.9.0 Dec 15, 2015 Changes in this version + const EtcdServersPrefix + const EtcdServersPrefixCnt + const FlagCAFile + const FlagEtcd + const FlagHTTPHost + const FlagKeyFile + const FlagLogLevel + const FlagRPCHost + const FlagTCPHost + const FlagUseHttps + const FlagUseTls + var ExternalIP string + var InternalIP string + var Log *logrus.Entry + func GetRPCHost() string + func GetServerHosts(serverName string, hostType string) ([]string, error) + func Init(name string) error + func RPCCallByHost(host string, serverMethod string, args interface{}, reply interface{}) error + func RPCCallByName(serverName string, serverMethod string, args interface{}, reply interface{}) error + func RegisterHTTPHandler(handler http.Handler) error + func RegisterRPCHandler(rcvr interface{}) error + func RegisterTCPHandler(handler TCPHandler) error + func RegisterTimerTask(task TimerTask) error + func Run() error + type HTTPServer struct + func (hs *HTTPServer) Start() error + type RPCClient struct + func NewRPCClient() (*RPCClient, error) + func (client *RPCClient) Call(severName string, serverMethod string, args interface{}, reply interface{}) error + func (client *RPCClient) CallHost(host string, serverMethod string, args interface{}, reply interface{}) error + type RPCServer struct + type Server struct + type ServerManager struct + func NewServerManager(name string, etcd string) (*ServerManager, error) + func (mgr *ServerManager) GetServerHosts(serverName string, hostType string) ([]string, error) + func (mgr *ServerManager) RegisterServer() error + func (mgr *ServerManager) UpdateServerHosts() error + type TCPHandler interface + Handle func(net.Conn) + type TCPServer struct + func (ts *TCPServer) Start() error + type TimerTask interface + DoTask func()