Versions in this module Expand all Collapse all v1 v1.0.5 Jan 22, 2020 Changes in this version + const ReadTimeout + const WriteTimeout + var RE_ADDRESS = regexp.MustCompile(`^(?i)[a-z0-9]{25,34}$`) + var RE_EMAIL = regexp.MustCompile(`^(?i)(` + dotAtom + `)@(` + dotAtom + `)$`) + var RE_HEX = regexp.MustCompile(`^(?i)[a-f0-9]+$`) + var RE_HOST = regexp.MustCompile(`^(?i)(` + domain + `)$`) + var RE_INT = regexp.MustCompile(`^-?[0-9]+$`) + func EventSubscriber(eventSub types.EventSubscriber) func(*wsConnection) + func GetParam(r *http.Request, param string) string + func GetParamByteSlice(r *http.Request, param string) ([]byte, error) + func GetParamFloat64(r *http.Request, param string) (float64, error) + func GetParamInt32(r *http.Request, param string) (int32, error) + func GetParamInt64(r *http.Request, param string) (int64, error) + func GetParamRegexp(r *http.Request, param string, re *regexp.Regexp) (string, error) + func GetParamUint(r *http.Request, param string) (uint, error) + func GetParamUint64(r *http.Request, param string) (uint64, error) + func Listen(addr string, config Config) (listener net.Listener, err error) + func NewWSConnection(baseConn *websocket.Conn, funcMap map[string]*RPCFunc, cdc *amino.Codec, ...) *wsConnection + func PingPeriod(pingPeriod time.Duration) func(*wsConnection) + func ReadWait(readWait time.Duration) func(*wsConnection) + func RecoverAndLogHandler(handler http.Handler, logger log.Logger) http.Handler + func RegisterRPCFuncs(mux *http.ServeMux, funcMap map[string]*RPCFunc, cdc *amino.Codec, ...) + func StartHTTPAndTLSServer(listener net.Listener, handler http.Handler, certFile, keyFile string, ...) error + func StartHTTPServer(listener net.Listener, handler http.Handler, logger log.Logger) error + func WriteChanCapacity(cap int) func(*wsConnection) + func WriteRPCResponseHTTP(w http.ResponseWriter, res types.RPCResponse) + func WriteRPCResponseHTTPError(w http.ResponseWriter, httpCode int, res types.RPCResponse) + func WriteWait(writeWait time.Duration) func(*wsConnection) + type Config struct + MaxOpenConnections int + type RPCFunc struct + func NewRPCFunc(f interface{}, args string) *RPCFunc + func NewWSRPCFunc(f interface{}, args string) *RPCFunc + type ResponseWriterWrapper struct + Status int + func (w *ResponseWriterWrapper) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (w *ResponseWriterWrapper) WriteHeader(status int) + type WebsocketManager struct + func NewWebsocketManager(funcMap map[string]*RPCFunc, cdc *amino.Codec, ...) *WebsocketManager + func (wm *WebsocketManager) SetLogger(l log.Logger) + func (wm *WebsocketManager) WebsocketHandler(w http.ResponseWriter, r *http.Request)