Documentation
¶
Index ¶
- func JSONWrite(w io.Writer, obj interface{}) error
- type Engine
- func (m Engine) AddSubscription(clientId string, subscriptions []string)
- func (m Engine) Connect(request protocol.Message, client *protocol.Client, conn protocol.Connection)
- func (m Engine) Disconnect(request protocol.Message, client *protocol.Client, conn protocol.Connection)
- func (m Engine) GetClient(clientId string) *protocol.Client
- func (m Engine) Handshake(request protocol.Message, conn protocol.Connection) string
- func (m Engine) NewClient(conn protocol.Connection) *protocol.Client
- func (m Engine) Publish(request protocol.Message, conn protocol.Connection)
- func (m Engine) PublishFromService(recipientId string, msg protocol.Message)
- func (m Engine) SubscribeClient(request protocol.Message, client *protocol.Client)
- func (m Engine) SubscribeService(chanOut chan<- protocol.Message, subscription []string)
- type MemoryNamespace
- type Server
- func (s Server) Engine() Engine
- func (s Server) GetClient(request protocol.Message, conn protocol.Connection) *protocol.Client
- func (s Server) HandleMessage(msg protocol.Message, conn protocol.Connection)
- func (s Server) HandleMeta(msg protocol.Message, conn protocol.Connection) protocol.Message
- func (s Server) HandlePublish(msg protocol.Message, conn protocol.Connection)
- func (s Server) HandleRequest(msges interface{}, conn protocol.Connection)
- func (s Server) Logger() utils.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (Engine) AddSubscription ¶
func (Engine) Disconnect ¶
func (Engine) PublishFromService ¶
Publish message directly to client msg should have "channel" which the client is expecting, e.g. "/service/echo"
func (Engine) SubscribeClient ¶
type MemoryNamespace ¶
type MemoryNamespace struct {
// contains filtered or unexported fields
}
func NewMemoryNamespace ¶
func NewMemoryNamespace() MemoryNamespace
func (MemoryNamespace) Expire ¶
func (m MemoryNamespace) Expire(id string)
func (MemoryNamespace) Generate ¶
func (m MemoryNamespace) Generate() string
func (MemoryNamespace) IsUsed ¶
func (m MemoryNamespace) IsUsed(id string) bool
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (Server) HandleMessage ¶
func (s Server) HandleMessage(msg protocol.Message, conn protocol.Connection)
func (Server) HandleMeta ¶
func (Server) HandlePublish ¶
func (s Server) HandlePublish(msg protocol.Message, conn protocol.Connection)
func (Server) HandleRequest ¶
func (s Server) HandleRequest(msges interface{}, conn protocol.Connection)
Click to show internal directories.
Click to hide internal directories.