While being used from probe-cli, it would be very useful to be able to quickly see at which stage in a connection the client bootstrap has been left - either after a failure, timeout or regular operation.
@bassosimone suggested something along these lines:
Add a public field to the Client struct, that is nil with the default constructor.
Define an Event data structure (that maps to, say, uint16).
The new public field is a chan(Event).
If not nil, the client can emit a new event on that channel for each state transition that we want to register.
The receiver should either make sure that the channel is consumed regularly, or provide a sufficiently-buffered channel.
While being used from probe-cli, it would be very useful to be able to quickly see at which stage in a connection the client bootstrap has been left - either after a failure, timeout or regular operation.
@bassosimone suggested something along these lines:
Client
struct, that is nil with the default constructor.Event
data structure (that maps to, say,uint16
).chan(Event)
.