go-sessions
go-sessions copied to clipboard
Database interface should accept context.Context for all methods
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...