Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerConfig ¶
type BrokerConfig struct { Broker string `json:"broker"` Username string `json:"username"` Password string `json:"password"` CaCert string `json:"caCert,omitempty"` ClientCert string `json:"clientCert,omitempty"` ClientKey string `json:"clientKey,omitempty"` }
BrokerConfig contains address and credentials for the MQTT broker
func (*BrokerConfig) Validate ¶
func (b *BrokerConfig) Validate() error
Validate validates the Broker config.
type EdgeConfiguration ¶
type EdgeConfiguration struct { DeviceID string `json:"deviceId"` TenantID string `json:"tenantId"` PolicyID string `json:"policyId"` }
EdgeConfiguration represents local Edge Thing configuration - its device, tenant and policy identifiers.
type EdgeConnector ¶
type EdgeConnector interface { // Update updates the MQTT client and/or the configurations of the connector and connects it. Update(mqttClient MQTT.Client, edgeConfig *EdgeConfiguration) // Close disconnects the connector and the MQTT client and cleans up used resources. Close() }
EdgeConnector declares update and close function for every edge client.
type EdgeManager ¶
type EdgeManager struct {
// contains filtered or unexported fields
}
EdgeManager represents the EdgeConnector used for connection with its configurations.
func NewEdgeManager ¶
func NewEdgeManager(config *BrokerConfig, edgeConnector EdgeConnector) (*EdgeManager, error)
NewEdgeManager creates EdgeManager with the given BrokerConfig and sets up a listener for EdgeConfiguration changes.
Click to show internal directories.
Click to hide internal directories.