Documentation
¶
Index ¶
- Variables
- func ParseURL(url string) (*backend.Options, error)
- type Locker
- type Option
- type Store
- func (s *Store) Client() *backend.Client
- func (s *Store) Close() error
- func (s *Store) Delete(ctx context.Context, sessionID string) error
- func (s *Store) List(ctx context.Context) ([]string, error)
- func (s *Store) Load(ctx context.Context, sessionID string) (*domain.State, error)
- func (s *Store) Save(ctx context.Context, sessionID string, state *domain.State) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrLockAcquire is returned when the lock cannot be acquired. ErrLockAcquire = errors.New("failed to acquire distributed lock") )
Functions ¶
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker implements ports.DistributedLocker using Redis.
type Option ¶
type Option func(*Store)
func WithPrefix ¶
WithPrefix sets the key prefix for sessions.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements ports.StateStore using Redis.
func NewFromClient ¶
NewFromClient creates a new Redis store from an existing client.
func (*Store) List ¶
List returns active sessions by scanning keys. Updated to use ZSET lazy cleanup.
Click to show internal directories.
Click to hide internal directories.