mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +02:00
8dec7cf5e8
* feat(registry): zookeeper watch node changed * fix lint * fix lint * fix lint * fix lint * fix(stop): cancel context when stop * fix(mod): add replace
17 lines
296 B
Go
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
|
|
}
|