Documentation ¶
Index ¶
- type Callback
- type Connector
- func (c *Connector) Close()
- func (c *Connector) Notify(route string, v proto.Message) error
- func (c *Connector) On(event string, callback Callback)
- func (c *Connector) OnConnected(callback func())
- func (c *Connector) Request(route string, v proto.Message, callback Callback) error
- func (c *Connector) 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 Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector is a tiny Nano client
func (*Connector) Close ¶
func (c *Connector) Close()
Close close the connection, and shutdown the benchmark
func (*Connector) OnConnected ¶
func (c *Connector) 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.