Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.3.0
type Client interface { Name() string Run() Shutdown() ReplaceTemplate(template string) string AddRoute(subscribeTopic string, messageHandler MessageHandler) }
type ClientPool ¶ added in v1.3.0
type ClientPool struct {
// contains filtered or unexported fields
}
func RunPool ¶ added in v1.3.0
func RunPool() (pool *ClientPool)
func (*ClientPool) AddClient ¶ added in v1.3.0
func (p *ClientPool) AddClient(client Client)
func (*ClientPool) GetClientsByNames ¶ added in v1.7.0
func (p *ClientPool) GetClientsByNames(clientNames []string) (clients []Client)
func (*ClientPool) RemoveClient ¶ added in v1.3.0
func (p *ClientPool) RemoveClient(client Client)
func (*ClientPool) RunClients ¶ added in v1.7.0
func (p *ClientPool) RunClients()
func (*ClientPool) Shutdown ¶ added in v1.3.0
func (p *ClientPool) Shutdown()
type ClientStruct ¶ added in v1.3.0
type ClientStruct struct {
// contains filtered or unexported fields
}
func (*ClientStruct) AddRoute ¶ added in v1.7.0
func (c *ClientStruct) AddRoute(subscribeTopic string, messageHandler MessageHandler)
func (*ClientStruct) AvailabilityEnabled ¶ added in v1.7.0
func (c *ClientStruct) AvailabilityEnabled() bool
func (*ClientStruct) GetAvailabilityTopic ¶ added in v1.7.0
func (c *ClientStruct) GetAvailabilityTopic() string
func (*ClientStruct) Name ¶ added in v1.7.0
func (c *ClientStruct) Name() string
func (*ClientStruct) ReplaceTemplate ¶ added in v1.7.0
func (c *ClientStruct) ReplaceTemplate(template string) string
type ClientV5 ¶ added in v1.7.0
type ClientV5 struct { ClientStruct // contains filtered or unexported fields }
func CreateV5 ¶ added in v1.7.0
func CreateV5( cfg Config, devicePoolInstance *device.DevicePool, storage *dataflow.ValueStorageInstance, ) (client *ClientV5)
type Config ¶ added in v1.3.0
type Config interface { Name() string Broker() *url.URL User() string Password() string ClientId() string Qos() byte KeepAlive() time.Duration ConnectRetryDelay() time.Duration ConnectTimeout() time.Duration AvailabilityTopic() string TelemetryInterval() time.Duration TelemetryTopic() string TelemetryRetain() bool RealtimeEnable() bool RealtimeTopic() string RealtimeRetain() bool TopicPrefix() string LogDebug() bool LogMessages() bool }
type MessageHandler ¶ added in v1.7.0
type MessageHandler func(Message)
type NumericRealtimeMessage ¶ added in v1.3.0
type NumericTelemetryValue ¶ added in v1.3.0
type TelemetryMessage ¶
type TelemetryMessage struct { Time string NextTelemetry string Model string SecondsSinceLastUpdate float64 NumericValues map[string]NumericTelemetryValue TextValues map[string]TextTelemetryValue }
type TextRealtimeMessage ¶ added in v1.3.0
type TextTelemetryValue ¶ added in v1.3.0
type TextTelemetryValue struct {
Value string
}
Click to show internal directories.
Click to hide internal directories.