package lock import ( "context" "time" ) type Locker interface { WithLock(ctx context.Context, key string, timeout time.Duration, fn func(ctx context.Context) error) error }