Table now has a dedicated package inside router package.

This commit is contained in:
Milos Gajdos
2019-07-08 16:51:55 +01:00
parent 0c1a28a9b6
commit cc590f5f2c
9 changed files with 71 additions and 62 deletions

View File

@@ -1,7 +1,11 @@
// Package router provides a network routing control plane
package router
import "time"
import (
"time"
"github.com/micro/go-micro/network/router/table"
)
var (
// DefaultRouter is default network router
@@ -17,7 +21,7 @@ type Router interface {
// ID returns the ID of the router
ID() string
// Table returns the routing table
Table() Table
Table() table.Table
// Address returns the router adddress
Address() string
// Network returns the network address of the router
@@ -65,8 +69,8 @@ type Advert struct {
ID string
// Timestamp marks the time when the update is sent
Timestamp time.Time
// Events is a list of events to advertise
Events []*Event
// Events is a list of routing table events to advertise
Events []*table.Event
}
// StatusCode defines router status