summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
commitf0ae221b894fdd02f697f4fb6994623082e2175e (patch)
treea75e87baad198d843e5201099563713886edfb28 /server/server.go
parentd387fd92e71a42e243cedef32f0812c72474c418 (diff)
update the whole code for the latest openconfig yang files
The modified openconfig yang files are available at: https://github.com/osrg/yang/tree/gobgp Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/server.go b/server/server.go
index 8fa743bd..39f5fe48 100644
--- a/server/server.go
+++ b/server/server.go
@@ -56,10 +56,10 @@ type peerMapInfo struct {
}
type BgpServer struct {
- bgpConfig config.BgpType
- globalTypeCh chan config.GlobalType
- addedPeerCh chan config.NeighborType
- deletedPeerCh chan config.NeighborType
+ bgpConfig config.Bgp
+ globalTypeCh chan config.Global
+ addedPeerCh chan config.Neighbor
+ deletedPeerCh chan config.Neighbor
RestReqCh chan *api.RestRequest
listenPort int
peerMap map[string]peerMapInfo
@@ -67,9 +67,9 @@ type BgpServer struct {
func NewBgpServer(port int) *BgpServer {
b := BgpServer{}
- b.globalTypeCh = make(chan config.GlobalType)
- b.addedPeerCh = make(chan config.NeighborType)
- b.deletedPeerCh = make(chan config.NeighborType)
+ b.globalTypeCh = make(chan config.Global)
+ b.addedPeerCh = make(chan config.Neighbor)
+ b.deletedPeerCh = make(chan config.Neighbor)
b.RestReqCh = make(chan *api.RestRequest, 1)
b.listenPort = port
return &b
@@ -203,15 +203,15 @@ func sendServerMsgToAll(peerMap map[string]peerMapInfo, msg *serverMsg) {
}
}
-func (server *BgpServer) SetGlobalType(g config.GlobalType) {
+func (server *BgpServer) SetGlobalType(g config.Global) {
server.globalTypeCh <- g
}
-func (server *BgpServer) PeerAdd(peer config.NeighborType) {
+func (server *BgpServer) PeerAdd(peer config.Neighbor) {
server.addedPeerCh <- peer
}
-func (server *BgpServer) PeerDelete(peer config.NeighborType) {
+func (server *BgpServer) PeerDelete(peer config.Neighbor) {
server.deletedPeerCh <- peer
}