Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinLogger ¶
func GinLogger(logger loggerEntryWithFields, timeFormat string, utc bool) gin.HandlerFunc
Ginrus returns a gin.HandlerFunc (middleware) that logs requests using logrus.
Requests with errors are logged using logrus.Error(). Requests without errors are logged using logrus.Info().
It receives:
- A time package format string (e.g. time.RFC3339).
- A boolean stating whether to use UTC time zone or local.
Types ¶
type Client ¶
type Client struct { // The websocket connection. Conn *websocket.Conn // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the hub.
type Hub ¶
type Hub struct { Status int // contains filtered or unexported fields }
Hub maintains the set of active clients and broadcasts messages to the clients.
func (*Hub) Unicast ¶
func (h *Hub) Unicast(msg *UnicastMessage)
type UnicastMessage ¶
Click to show internal directories.
Click to hide internal directories.