feat: registry.
This commit is contained in:
16
registry/zookeeper/service.go
Normal file
16
registry/zookeeper/service.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user