move generic communication substrate into its own 'mesh' package

This is mostly a matter of moving some files, changing package names,
changing some imports, and changing some type references.

We duplicate the odd constant & global var, and the intmac/macint
functions, since neither 'router' or 'mesh' nor, really,' common' are
a natural home for them.
This commit is contained in:
Matthias Radestock committed 2015-11-09 16:37:39 +00:00
1 parent e5c69801a7
commit dc9f8762ca
47 files changed
+304 -254

No files matched your search

+4 -2
View File
@@ -2,10 +2,12 @@ package router
import (
"time"
"github.com/weaveworks/weave/mesh"
)
type NetworkRouterStatus struct {
*Status
*mesh.Status
Interface string
CaptureStats map[string]int
MACs []MACStatus
@@ -20,7 +22,7 @@ type MACStatus struct {
func NewNetworkRouterStatus(router *NetworkRouter) *NetworkRouterStatus {
return &NetworkRouterStatus{
NewStatus(router.Router),
mesh.NewStatus(router.Router),
router.Bridge.String(),
router.Bridge.Stats(),
NewMACStatusSlice(router.Macs)}