Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a message queue for queueing and sending messages to users.
func (*Queue) AddRequest ¶
func (q *Queue) AddRequest(userID string, method string, params interface{}, resHandler func(ctx *neptulon.ResCtx) error) error
AddRequest queues a request message to be sent to the given user.
func (*Queue) Middleware ¶
Middleware registers a queue middleware to register user/connection IDs for connecting users (upon their first incoming-message).
func (*Queue) RemoveConn ¶
RemoveConn removes a user's associated connection ID.
type SenderFunc ¶
type SenderFunc func(connID string, method string, params interface{}, resHandler func(ctx *neptulon.ResCtx) error) (reqID string, err error)
SenderFunc is a function for sending messages over connections ID.
type UserDB ¶
type UserDB struct {
// contains filtered or unexported fields
}
UserDB is in-memory user database.
func (UserDB) GetByEmail ¶
GetByEmail retrieves a user by e-mail address.
Click to show internal directories.
Click to hide internal directories.