12345678910111213141516171819202122232425262728 |
- package main
- import "sparrow/pkg/protocol"
- type Agent struct {
- }
- // Message 收到设备上报消息处理
- func (a *Agent) Message(topic string, payload []byte) error {
- //TODO implement me
- panic("implement me")
- }
- // Connected 设备接入时
- func (a *Agent) Connected(status *protocol.DevConnectStatus) error {
- //TODO implement me
- panic("implement me")
- }
- // Disconnected 设备断开连接时
- func (a *Agent) Disconnected(status *protocol.DevConnectStatus) error {
- //TODO implement me
- panic("implement me")
- }
- func NewAgent() *Agent {
- return &Agent{}
- }
|