Expose and test EventSwitch in client.Local

This commit is contained in:
Ethan Frey
2017-02-24 17:51:19 +01:00
parent 98450ee2db
commit 9be3064904
3 changed files with 74 additions and 14 deletions

View File

@@ -23,6 +23,7 @@ powerful control during testing, you probably want the "client/mock" package.
*/
type Local struct {
node *nm.Node
types.EventSwitch
}
// NewLocal configures a client that calls the Node directly.
@@ -34,7 +35,8 @@ type Local struct {
func NewLocal(node *nm.Node) Local {
node.ConfigureRPC()
return Local{
node: node,
node: node,
EventSwitch: node.EventSwitch(),
}
}