Documentation ¶
Index ¶
- func GenerateRequestID() (requestID string)
- type Client
- func (client *Client) Close() (err error)
- func (client *Client) Connect(url string) (err error)
- func (client *Client) Disconnect() (err error)
- func (client *Client) IsConnected() (result bool)
- func (client *Client) SendMessage(message interface{}) (err error)
- func (client *Client) SendRequest(idField string, idValue interface{}, req interface{}, rsp interface{}) (err error)
- type ClientParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRequestID ¶
func GenerateRequestID() (requestID string)
GenerateRequestID generates unique request ID.
Types ¶
type Client ¶
Client VIS client object.
func New ¶
func New(name string, clientParam ClientParam, messageHandler func([]byte)) (client *Client, err error)
New creates new ws client.
func (*Client) Disconnect ¶
Disconnect disconnects from ws server.
func (*Client) IsConnected ¶
IsConnected returns true if connected to ws server.
func (*Client) SendMessage ¶
SendMessage sends message without waiting for response.
func (*Client) SendRequest ¶
func (client *Client) SendRequest(idField string, idValue interface{}, req interface{}, rsp interface{}) (err error)
SendRequest sends request and waits for response.
type ClientParam ¶
ClientParam client parameters.
Click to show internal directories.
Click to hide internal directories.