Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) PublishOnMqttTopic(topic string, payload []byte) error
- func (c *Client) RegisterMqttTopic(topic string) (schema.RegisterSubResponseType, error)
- func (c *Client) RequestReply(topic string, payload []byte, timeout int32) ([]byte, error)
- func (c *Client) UnregisterNatsSubject(subject string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DataCodec is the parsed dataSchema.avsc DataCodec *goavro.Codec = avro.CreateSchema(dataSchema) )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct containing client relevant data
func (*Client) PublishOnMqttTopic ¶
PublishOnMqttTopic is used to to send to a specific MQTT topic.
func (*Client) RegisterMqttTopic ¶
func (c *Client) RegisterMqttTopic(topic string) (schema.RegisterSubResponseType, error)
RegisterMqttTopic is used to let a client register to a specific MQTT topic. This functions returns a nats subject the client can subscribe to in order to read the forwarded message.
func (*Client) RequestReply ¶
RequestReply is used to to send to a specific MQTT topic.
func (*Client) UnregisterNatsSubject ¶
UnregisterNatsSubject is used to unregister a client from a specific nats subject previously registered using 'RegisterMqttTopic'.
Click to show internal directories.
Click to hide internal directories.