Documentation ¶
Index ¶
- type Callback
- type Client
- func (c *Client) Close()
- func (c *Client) Notify(route string, v proto.Message) error
- func (c *Client) On(event string, callback Callback)
- func (c *Client) OnConnected(callback func())
- func (c *Client) Request(route string, v proto.Message, callback Callback) error
- func (c *Client) Start(addr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(data interface{})
Callback represents the callback type which will be called when the correspond events is occurred.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a tiny Ngs client
func (*Client) OnConnected ¶
func (c *Client) OnConnected(callback func())
OnConnected set the callback which will be called when the client connected to the server
Click to show internal directories.
Click to hide internal directories.