Commit 6b813583 authored by suyanlong's avatar suyanlong

fixed bug for checker

parent 5cc13f3c
Pipeline #8334 failed with stages
...@@ -17,14 +17,14 @@ import ( ...@@ -17,14 +17,14 @@ import (
) )
type router struct { type router struct {
logger logrus.FieldLogger logger logrus.FieldLogger
ctx context.Context ctx context.Context
cancel context.CancelFunc cancel context.CancelFunc
checker checker.Checker checker checker.Checker
portMap *port.PortMap portMap *port.PortMap
methodMap map[string]routeMethod methodMap map[string]routeMethod
privateKey crypto.PrivateKey privateKey crypto.PrivateKey
//hubPublicKey crypto.PublicKey // hubPublicKey crypto.PublicKey
} }
type routeMethod func([]string) []port.Port type routeMethod func([]string) []port.Port
...@@ -38,6 +38,7 @@ func NewRouter(privateKey crypto.PrivateKey, logger logrus.FieldLogger) Router { ...@@ -38,6 +38,7 @@ func NewRouter(privateKey crypto.PrivateKey, logger logrus.FieldLogger) Router {
portMap: port.NewPortMap(), portMap: port.NewPortMap(),
methodMap: map[string]routeMethod{}, methodMap: map[string]routeMethod{},
privateKey: privateKey, privateKey: privateKey,
checker: &checker.MockChecker{}, //TODO
} }
} }
...@@ -350,7 +351,6 @@ func (r *router) AsyncSend(id string, msg *pb.Message) error { ...@@ -350,7 +351,6 @@ func (r *router) AsyncSend(id string, msg *pb.Message) error {
return errors.New("id error!") return errors.New("id error!")
} }
type RouteMethod interface { type RouteMethod interface {
Single([]string) []port.Port Single([]string) []port.Port
Multicast([]string) []port.Port Multicast([]string) []port.Port
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment