Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config HTTP config
type Server ¶
Server ...
func (*Server) GracefulStop ¶
GracefulStop implements server.Server interface it will stop gin server gracefully
func (*Server) Info ¶
func (s *Server) Info() *server.ServiceInfo
Info returns server info, used by governor and consumer balancer
func (*Server) ServerInterceptor ¶
func (s *Server) ServerInterceptor(fn gin.HandlerFunc) *Server
ServerInterceptor ...
type WebSocket ¶
type WebSocket struct { Pattern string Name string Handler WebSocketFunc *websocket.Upgrader Header http.Header }
WebSocket ..
func WebSocketOptions ¶
func WebSocketOptions(pattern, name string, handler WebSocketFunc, opts ...WebSocketOption) *WebSocket
WebSocketOptions ..
type WebSocketConn ¶
type WebSocketConn interface { Subprotocol() string Close() error LocalAddr() net.Addr RemoteAddr() net.Addr WriteControl(messageType int, data []byte, deadline time.Time) error NextWriter(messageType int) (io.WriteCloser, error) WritePreparedMessage(pm *websocket.PreparedMessage) error WriteMessage(messageType int, data []byte) error SetWriteDeadline(t time.Time) error NextReader() (messageType int, r io.Reader, err error) ReadMessage() (messageType int, p []byte, err error) SetReadDeadline(t time.Time) error SetReadLimit(limit int64) CloseHandler() func(code int, text string) error SetCloseHandler(h func(code int, text string) error) PingHandler() func(appData string) error SetPingHandler(h func(appData string) error) PongHandler() func(appData string) error SetPongHandler(h func(appData string) error) UnderlyingConn() net.Conn EnableWriteCompression(enable bool) SetCompressionLevel(level int) error }
WebSocketConn websocket conn, see websocket.Conn
Click to show internal directories.
Click to hide internal directories.