mirror of
https://github.com/dpup/meshstream.git
synced 2026-05-18 07:15:42 +02:00
14 lines
303 B
Go
14 lines
303 B
Go
package mqtt
|
|
|
|
import (
|
|
meshtreampb "meshstream/generated/meshstream"
|
|
)
|
|
|
|
// NewPacket creates a new Packet from a data packet and topic info
|
|
func NewPacket(data *meshtreampb.Data, topicInfo *meshtreampb.TopicInfo) *meshtreampb.Packet {
|
|
return &meshtreampb.Packet{
|
|
Data: data,
|
|
Info: topicInfo,
|
|
}
|
|
}
|