nats discovery
This commit is contained in:
parent
3e7f8513eb
commit
73fce1d8fb
@ -51,14 +51,14 @@ func (s State) String() string {
|
||||
|
||||
type API struct{}
|
||||
|
||||
func (a *API) Discovered() {
|
||||
func (a *API) Discovered(infos []*beego.ControllerInfo) {
|
||||
respondToDiscovery := func(m map[string]interface{}) {
|
||||
if len(m) == 0 {
|
||||
a.SubscribeRouter()
|
||||
a.SubscribeRouter(infos)
|
||||
}
|
||||
}
|
||||
a.ListenRouter(respondToDiscovery)
|
||||
a.SubscribeRouter()
|
||||
a.SubscribeRouter(infos)
|
||||
}
|
||||
|
||||
// GetState returns the state of the API
|
||||
|
Loading…
Reference in New Issue
Block a user