remove rcache
This commit is contained in:
		| @@ -25,7 +25,7 @@ import ( | |||||||
| 	maddr "github.com/micro/go-micro/util/addr" | 	maddr "github.com/micro/go-micro/util/addr" | ||||||
| 	mnet "github.com/micro/go-micro/util/net" | 	mnet "github.com/micro/go-micro/util/net" | ||||||
| 	mls "github.com/micro/go-micro/util/tls" | 	mls "github.com/micro/go-micro/util/tls" | ||||||
| 	"github.com/micro/go-rcache" | 	"github.com/micro/go-micro/registry/cache" | ||||||
| 	"golang.org/x/net/http2" | 	"golang.org/x/net/http2" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -412,8 +412,8 @@ func (h *httpBroker) Connect() error { | |||||||
| 	if !ok { | 	if !ok { | ||||||
| 		reg = registry.DefaultRegistry | 		reg = registry.DefaultRegistry | ||||||
| 	} | 	} | ||||||
| 	// set rcache | 	// set cache | ||||||
| 	h.r = rcache.New(reg) | 	h.r = cache.New(reg) | ||||||
|  |  | ||||||
| 	// set running | 	// set running | ||||||
| 	h.running = true | 	h.running = true | ||||||
| @@ -432,8 +432,8 @@ func (h *httpBroker) Disconnect() error { | |||||||
| 	h.Lock() | 	h.Lock() | ||||||
| 	defer h.Unlock() | 	defer h.Unlock() | ||||||
|  |  | ||||||
| 	// stop rcache | 	// stop cache | ||||||
| 	rc, ok := h.r.(rcache.Cache) | 	rc, ok := h.r.(cache.Cache) | ||||||
| 	if ok { | 	if ok { | ||||||
| 		rc.Stop() | 		rc.Stop() | ||||||
| 	} | 	} | ||||||
| @@ -477,13 +477,13 @@ func (h *httpBroker) Init(opts ...Option) error { | |||||||
| 		reg = registry.DefaultRegistry | 		reg = registry.DefaultRegistry | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// get rcache | 	// get cache | ||||||
| 	if rc, ok := h.r.(rcache.Cache); ok { | 	if rc, ok := h.r.(cache.Cache); ok { | ||||||
| 		rc.Stop() | 		rc.Stop() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// set registry | 	// set registry | ||||||
| 	h.r = rcache.New(reg) | 	h.r = cache.New(reg) | ||||||
|  |  | ||||||
| 	// reconfigure tls config | 	// reconfigure tls config | ||||||
| 	if c := h.opts.TLSConfig; c != nil { | 	if c := h.opts.TLSConfig; c != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user