- Agent roles and coordination features - Chat API integration testing - New configuration and workspace management 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
402 B
Go
20 lines
402 B
Go
package natpmp
|
|
|
|
import "time"
|
|
|
|
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, timeout time.Duration) (result []byte, err error) {
|
|
result, err = n.child.call(msg, timeout)
|
|
n.observer.observeCall(msg, result, err)
|
|
return
|
|
}
|