Commit 107cf690 authored by luxq's avatar luxq

fix bug

parent d2e172ac
...@@ -12,10 +12,10 @@ import ( ...@@ -12,10 +12,10 @@ import (
) )
type RegistryInfo struct { type RegistryInfo struct {
ServiceName string `redis:"service_name" json:"service_name"` ServiceName string `redis:"service_name" json:"service_name"`
Timestamp int64 `redis:"timestamp" json:"timestamp"` Timestamp int64 `redis:"timestamp" json:"timestamp"`
Endpoint string `redis:"endpoint" json:"endpoint"` Endpoint string `redis:"endpoint" json:"endpoint"`
Detail json.RawMessage `redis:"detail" json:"detail"` Detail string `redis:"detail" json:"detail"`
} }
type Register interface { type Register interface {
...@@ -85,7 +85,7 @@ func (s *Registry) registry(rdb *redis.Client) error { ...@@ -85,7 +85,7 @@ func (s *Registry) registry(rdb *redis.Client) error {
ServiceName: s.register.ServiceType().String(), ServiceName: s.register.ServiceType().String(),
Timestamp: time.Now().Unix(), Timestamp: time.Now().Unix(),
Endpoint: s.register.Endpoint(), Endpoint: s.register.Endpoint(),
Detail: detail, Detail: string(detail),
}).Err() }).Err()
if err != nil { if err != nil {
log.WithError(err).Error("set register info failed") log.WithError(err).Error("set register info failed")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment