mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
849492fda9
* Add status-option code This commits changes the behavior of waku introducing a new status-code, `2`, that replaces the current single options codes. * linting
18 lines
355 B
Go
18 lines
355 B
Go
package natpmp
|
|
|
|
type callObserver interface {
|
|
observeCall(msg []byte, result []byte, err error)
|
|
}
|
|
|
|
// A caller that records the RPC call.
|
|
type recorder struct {
|
|
child caller
|
|
observer callObserver
|
|
}
|
|
|
|
func (n *recorder) call(msg []byte) (result []byte, err error) {
|
|
result, err = n.child.call(msg)
|
|
n.observer.observeCall(msg, result, err)
|
|
return
|
|
}
|