INNER CODE UNIT · Go
err
unitedrhino/things · sdk/protocol/cloudProtocol.go:171
err := f(ctx, *c, pi)
if err != nil {
logx.WithContext(ctx).Error(err)
}
}
return nil
})
return err
}
func (p *CloudProtocol[pConf]) UpdateConfig(ctx context.Context, c []pConf) error {
var KeySet = map[string]struct{}{}
//新增配置
p.ConfMapMutex.Lock()
defer p.ConfMapMutex.Unlock()
for _, v := range c {
key := v.GenKey()
KeySet[key] = struct{}{}