The Database interface should be duplicated and modified (e.g. DatabaseWithCtx) to support receiving the request context for each method call.
For example:
type Database interface {
Acquire(sid string, expires time.Duration) LifeTime
// ...
}
// Should become this ↓
type DatabaseWithCtx interface {
Acquire(ctx context.Context, sid string, expires time.Duration) LifeTime
// ...
}
This is important for things like tracing, logging, etc...
The Database interface should be duplicated and modified (e.g.
DatabaseWithCtx) to support receiving the request context for each method call.For example:
This is important for things like tracing, logging, etc...