aboutsummaryrefslogtreecommitdiff
path: root/rpc.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc.go')
-rw-r--r--rpc.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/rpc.go b/rpc.go
index e7ab0d9..5fe434a 100644
--- a/rpc.go
+++ b/rpc.go
@@ -9,22 +9,21 @@ type GoXY struct{}
func init() {
rpc.Register(GoXY{})
+ rpc.HandleHTTP()
}
func (GoXY) Add(e Entry, _ *struct{}) error {
log.Println("Add route", e)
defer route.Save(*data)
route[e.ServerName] = e
- route.Restore()
- return nil
+ return route.Restore()
}
func (GoXY) Del(e Entry, _ *struct{}) error {
log.Println("Del route", e)
defer route.Save(*data)
delete(route, e.ServerName)
- route.Restore()
- return nil
+ return route.Restore()
}
func (GoXY) List(_ struct{}, r *[]Entry) error {