Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MqttConnection ¶
type MqttConnection struct {
// contains filtered or unexported fields
}
MqttConnection represents the MQTT connection
func NewMqttConnection ¶
func NewMqttConnection() *MqttConnection
NewMqttConnection creates new MQTT client
func (*MqttConnection) Connect ¶
func (m *MqttConnection) Connect(connectTimeoutSeconds time.Duration) error
Connect to MQTT server. Server URL can be provided via MQTT_SERVER environment variable.
type NatsConnection ¶
type NatsConnection struct {
// contains filtered or unexported fields
}
NatsConnection represents nats connection
func NewNatsConnection ¶
func NewNatsConnection() *NatsConnection
NewNatsConnection creates new nats client
func (*NatsConnection) Connect ¶
func (n *NatsConnection) Connect(connectTimeoutSeconds int) error
Connect to NATS server. Server URL can be provided via NATS_SERVER environment variable. Provide NATS_CREDS_PATH if credentials shall be provided.
func (*NatsConnection) Publish ¶
func (n *NatsConnection) Publish(topic string, message []byte) error
Publish publish message to topic provided
func (*NatsConnection) Subscribe ¶
func (n *NatsConnection) Subscribe(subject string, handlerFunc interface{}) error
Subscribes to subject, required handler function for message receive.
Click to show internal directories.
Click to hide internal directories.