Documentation ¶
Index ¶
- type Client
- func (c *Client) AddSubscription(eventType model.EventType)
- func (c *Client) CallService(service services.Service)
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) GetDeviceRegistry() *model.Message
- func (c *Client) GetEntityRegistry() *model.Message
- func (c *Client) GetHistory(start, end time.Time, entities ...string) (*model.Histories, error)
- func (c *Client) GetServices() *model.Message
- func (c *Client) GetStates()
- func (c *Client) Logger() *logr.Logger
- func (c *Client) NextID() *int
- func (c *Client) SetLogger(logger logr.Logger)
- func (c *Client) WriteMessage(messageType websocket.MessageType, data []byte) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { OnMessage func(message model.Message) OnUnhandled func(message model.Message) InitStates bool OnType model.OnTypeHandlers OnEntity model.OnEntityHandlers OnGetState func(states []model.Result) // contains filtered or unexported fields }
func NewClientWithLogger ¶ added in v0.1.2
func (*Client) AddSubscription ¶
func (*Client) CallService ¶
func (*Client) GetDeviceRegistry ¶ added in v0.1.2
func (*Client) GetEntityRegistry ¶ added in v0.1.2
func (*Client) GetHistory ¶ added in v0.2.3
func (*Client) GetServices ¶
func (*Client) GetStates ¶
func (c *Client) GetStates()
GetStates requests all the current states and runs them through the handlers
func (*Client) WriteMessage ¶
func (c *Client) WriteMessage(messageType websocket.MessageType, data []byte) error
Click to show internal directories.
Click to hide internal directories.