boilerplate code
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package iot
|
||||
|
||||
import (
|
||||
"nats-app/internal/broker"
|
||||
)
|
||||
|
||||
type IoTDevice struct {
|
||||
NATS *broker.NATS
|
||||
}
|
||||
|
||||
func Start(environment, url string) *IoTDevice {
|
||||
|
||||
startRotativeLogger(environment)
|
||||
nats := broker.NewNATS(url)
|
||||
|
||||
return &IoTDevice{
|
||||
NATS: nats,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user