1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-28 03:57:02 +02:00
Ccheers 8dec7cf5e8
feat(registry): zookeeper watch node changed (#1986)
* feat(registry): zookeeper watch node changed

* fix lint

* fix lint

* fix lint

* fix lint

* fix(stop): cancel context when stop

* fix(mod): add replace
2022-05-20 22:39:13 +08:00

17 lines
296 B
Go

package zookeeper
import (
"encoding/json"
"github.com/go-kratos/kratos/v2/registry"
)
func marshal(si *registry.ServiceInstance) ([]byte, error) {
return json.Marshal(si)
}
func unmarshal(data []byte) (si *registry.ServiceInstance, err error) {
err = json.Unmarshal(data, &si)
return
}