DriverBox v2.0.0 正式上线,一款基于 Go 语言打造的轻量级边缘设备接入框架
本次版本升级涵盖架构重构、功能增强与体验优化等多个维度:
接口全面焕新,开发体验跃升 —— v2.0 对插件交互协议进行深度梳理,统一设备影子访问入口,引入事件驱动模型,显著提升扩展性、稳定性与开发效率。
RegisterPlugin → EnablePlugin
LoadExport → EnableExport
Initialize 方法入参由 3 个压缩为单一参数 config.DeviceConfig
helper.DeviceShadow → driverbox.Shadow()
DeviceAdded —— 新设备接入DeviceDeleting —— 设备即将被移除DeviceDiscover —— 自动发现设备DeviceOnOff —— 设备启停状态切换ShadowOnline —— 影子在线状态变更Exporting —— 数据导出行为触发ServiceStatus —— 框架服务运行状态更新Create(config) —— 创建联动规则Update(config) —— 更新已有规则Delete(id) —— 删除指定规则Get(id) —— 查询单条规则详情GetList(tag) —— 按标签筛选规则列表Trigger(id) —— 手动触发某条规则Execute(config) —— 即时执行联动逻辑driver-box/ → driver-box/ + pkg/ driver-box/export/ → exports/ └── linkedge/ → ├── linkedge/ ├── history/ (全新模块) └── discover/ (结构优化)

插件注册方式调整
// v1.5.5driverbox.RegisterPlugin("modbus", &modbus.Plugin{})// v2.0driverbox.EnablePlugin("modbus", &modbus.Plugin{})
设备影子调用路径变更
// v1.5.5helper.DeviceShadow.GetDevicePoint("device-001", "temperature")// v2.0driverbox.Shadow().GetDevicePoint("device-001", "temperature")
详细 Release Notes 请查阅:https://www./link/3870e23479b42ad046256d65834e987f
源码下载地址:点击获取