Versions in this module Expand all Collapse all v0 v0.17.1 Sep 6, 2017 v0.17.0 Sep 4, 2017 v0.16.3 Apr 25, 2017 v0.16.2 Apr 20, 2017 v0.16.1 Apr 4, 2017 Changes in this version + func InitLogger(config *ServerConfig) + func New(ctx ...interface{}) log15.Logger + func NewCORSMiddleware(options CORS) gin.HandlerFunc + func RootHandler() log15.Handler + type Bind struct + Address string + Port uint16 + type CORS struct + AllowCredentials bool + AllowHeaders []string + AllowMethods []string + AllowOrigins []string + Enable bool + ExposeHeaders []string + MaxAge uint64 + type HTTP struct + JsonRpcEndpoint string + type HttpService interface + Process func(*http.Request, http.ResponseWriter) + type IdPool struct + func NewIdPool(totNum uint) *IdPool + func (idp *IdPool) GetId() (uint, error) + func (idp *IdPool) ReleaseId(id uint) + type Logging struct + ConsoleLogLevel string + FileLogLevel string + LogFile string + type ServeProcess struct + func NewServeProcess(config *ServerConfig, servers ...Server) (*ServeProcess, error) + func (this *ServeProcess) Start() error + func (this *ServeProcess) StartEventChannel() <-chan struct{} + func (this *ServeProcess) Stop(timeout time.Duration) error + func (this *ServeProcess) StopEventChannel() <-chan struct{} + type Server interface + Running func() bool + ShutDown func() + Start func(*ServerConfig, *gin.Engine) + type ServerConfig struct + Bind Bind + CORS CORS + ChainId string + HTTP HTTP + Logging Logging + TLS TLS + Tendermint Tendermint + WebSocket WebSocket + func DefaultServerConfig() *ServerConfig + func ReadServerConfig(viper *viper.Viper) (*ServerConfig, error) + type SessionManager struct + func NewSessionManager(maxSessions uint16, wss WebSocketService) *SessionManager + func (this *SessionManager) RemoveSessionCloseEventChannel(lChan chan *WSSession) bool + func (this *SessionManager) RemoveSessionOpenEventChannel(lChan chan *WSSession) bool + func (this *SessionManager) SessionCloseEventChannel() <-chan *WSSession + func (this *SessionManager) SessionOpenEventChannel() <-chan *WSSession + func (this *SessionManager) Shutdown() + type SessionObserver interface + NotifyClosed func(*WSSession) + NotifyOpened func(*WSSession) + type TLS struct + CertPath string + KeyPath string + TLS bool + type Tendermint struct + Endpoint string + RpcLocalAddress string + type WSSession struct + func (this *WSSession) Close() + func (this *WSSession) Closed() bool + func (this *WSSession) Id() uint + func (this *WSSession) Open() + func (this *WSSession) Opened() bool + func (this *WSSession) Write(msg []byte) error + type WebSocket struct + MaxWebSocketSessions uint16 + ReadBufferSize uint64 + WebSocketEndpoint string + WriteBufferSize uint64 + type WebSocketServer struct + func NewWebSocketServer(maxSessions uint16, service WebSocketService) *WebSocketServer + func (this *WebSocketServer) Running() bool + func (this *WebSocketServer) SessionManager() *SessionManager + func (this *WebSocketServer) ShutDown() + func (this *WebSocketServer) Start(config *ServerConfig, router *gin.Engine) + type WebSocketService interface + Process func([]byte, *WSSession)