For any network calls / long operations it is important (for CFG prevention) to enforce timeouts. There are global timeouts on the connection to couchbase but no timeouts that are specific to particular requests. As some types of queries are naturally longer running than others, it is useful to be able to cancel anomalous long running requests dynamically (i.e. based on query type / current load / other kinds of anomaly detection).
The usual way to facilitate dynamic timeouts in a Go client package is to provide an API that allows for context.Context to be passed as the first argument (see the Go blog about context).
context.Context is also used by distributed tracing frameworks (i.e. OpenCensus) to thread span information through a program and across network boundaries.
Are there plans to support this kind of API in the existing Go SDK or a future one?