Documentation ¶
Index ¶
- func NewEventHandler(broadcast func(query string, message []byte), ...) *eventHandler
- type BroadcastClient
- type Client
- type IDirectMessage
- type IStreamClient
- type Message
- type Stream
- func (s *Stream) Broadcast(query string, message []byte)
- func (s *Stream) DirectMessage(userID int64, sessionID string, query string, message []byte)
- func (s *Stream) NewConnection(ws *websocket.Conn, user *m.User)
- func (s *Stream) Recv(client *Client, id, query string, b []byte)
- func (s *Stream) Shutdown(_ context.Context) error
- func (s *Stream) Start(_ context.Context) error
- func (s *Stream) Subscribe(command string, f func(IStreamClient, string, []byte))
- func (s *Stream) UnSubscribe(command string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BroadcastClient ¶
BroadcastClient ...
type IDirectMessage ¶
type IDirectMessage interface {
DirectMessage(userId int64, sessionId string, query string, message []byte)
}
IDirectMessage ...
type IStreamClient ¶
type IStreamClient interface { GetUser() *m.User SessionID() string Send(id string, query string, body []byte) error }
IStreamClient ...
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream ...
func NewStreamService ¶
NewStreamService ...
func (*Stream) DirectMessage ¶
DirectMessage ...
func (*Stream) NewConnection ¶
NewConnection ...
Click to show internal directories.
Click to hide internal directories.