mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-04-23 12:18:50 +02:00
25 lines
419 B
Go
25 lines
419 B
Go
|
package sessions
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type NoOpLock struct{}
|
||
|
|
||
|
func (l *NoOpLock) Obtain(ctx context.Context, expiration time.Duration) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (l *NoOpLock) Peek(ctx context.Context) (bool, error) {
|
||
|
return false, nil
|
||
|
}
|
||
|
|
||
|
func (l *NoOpLock) Refresh(ctx context.Context, expiration time.Duration) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (l *NoOpLock) Release(ctx context.Context) error {
|
||
|
return nil
|
||
|
}
|