Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusDeviceDisconnected int = 523 StatusDeviceTimeout int = 524 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
type ClientFactory struct { DeviceName string FirmwareName string ModelName string Manufacturer string DestinationURL string CRT string Key string Handlers []HandlerRegistry HandlePingMiss HandlePingMiss ClientLogger log.Logger }
ClientFactory is used to generate a client by calling new on this type
func (*ClientFactory) New ¶
func (f *ClientFactory) New() (Client, error)
New is used to create a new kratos Client from a ClientFactory
type HandlePingMiss ¶
type HandlePingMiss func() error
HandlePingMiss is a function called when we run into situations where we're not getting anymore pings the implementation of this function needs to be handled by the user of kratos
type HandlerRegistry ¶
type HandlerRegistry struct { HandlerKey string Handler ReadHandler // contains filtered or unexported fields }
HandlerRegistry is an internal data type for Client interface that helps keep track of registered handler functions
type ReadHandler ¶
type ReadHandler interface {
HandleMessage(msg interface{})
}
ReadHandler should be implemented by the user so that they may deal with received messages how they please
Click to show internal directories.
Click to hide internal directories.