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 ¶ added in v0.0.15
BroadcastClient ...
type IDirectMessage ¶ added in v0.9.5
type IDirectMessage interface {
DirectMessage(userId int64, sessionId string, query string, message []byte)
}
IDirectMessage ...
type IStreamClient ¶ added in v0.1.1
type IStreamClient interface { GetUser() *m.User SessionID() string Send(id string, query string, body []byte) error }
IStreamClient ...
type Stream ¶ added in v0.5.2
type Stream struct {
// contains filtered or unexported fields
}
Stream ...
func NewStreamService ¶
NewStreamService ...
func (*Stream) DirectMessage ¶ added in v0.9.5
DirectMessage ...
func (*Stream) NewConnection ¶ added in v0.5.2
NewConnection ...
func (*Stream) Subscribe ¶ added in v0.5.2
func (s *Stream) Subscribe(command string, f func(IStreamClient, string, []byte))
Subscribe ...
func (*Stream) UnSubscribe ¶ added in v0.5.2
UnSubscribe ...
Click to show internal directories.
Click to hide internal directories.