Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectedHandler ¶
type ConnectedHandler func(conn *Connection)
type Connection ¶
type Connection struct { OnConnectionLost LostHandler OnConnect ConnectedHandler // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(url string, token string) *Connection
func (*Connection) Connect ¶
func (c *Connection) Connect()
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect()
func (*Connection) SubscribeStateEvents ¶
func (c *Connection) SubscribeStateEvents(entityId string, handler StateEventHandler) error
func (*Connection) UnsubscribeStateEvents ¶
func (c *Connection) UnsubscribeStateEvents(entityId string) error
type LostHandler ¶
type LostHandler func(conn *Connection, err error)
type StateEventHandler ¶
type StateEventHandler func(entityId string, event msgs.EventResponse)
Click to show internal directories.
Click to hide internal directories.