libchan icon indicating copy to clipboard operation
libchan copied to clipboard

Proposal: Use context throughout libchan

Open pnasrat opened this issue 10 years ago • 1 comments

In libchan we need a way to seamlessly carry trace, debugging, cancellation and other data across boundaries - whether that be process, goroutine or RPC.

The code.google.com/p/go.net/context package provides wiring to do this. References http://blog.golang.org/context

If libchan can be seamlessly used over unix socket, go channels, etc a standardized mechanism for propagating scoped values, cancelation signals, and deadlines, etc across the boundaries would be awesome.

I'm happy to do the work but not sure if this is something people feel a need for at the moment

@shykes @dmcgowan ?

pnasrat avatar Aug 07 '14 01:08 pnasrat

There might be some overlap here with the proposal for logging and debugging but worth keeping separate. I think as we get closer to moving libchan into other projects this will be an important part of debugging. I think first off we need to figure out if these contexts are something that just need to be added as objects which are passed along as any other object or whether contexts should be transient and either we find a way to attach them to channel identifiers or make a protocol update.

dmcgowan avatar Nov 01 '14 02:11 dmcgowan