Documentation
¶
Index ¶
- type RueidisStore
- func (ru *RueidisStore) AllCtx(ctx context.Context) (map[string][]byte, error)
- func (ru *RueidisStore) Commit(token string, b []byte, expiry time.Time) error
- func (ru *RueidisStore) CommitCtx(ctx context.Context, token string, b []byte, expiry time.Time) error
- func (ru *RueidisStore) Delete(token string) error
- func (ru *RueidisStore) DeleteCtx(ctx context.Context, token string) error
- func (ru *RueidisStore) Find(token string) ([]byte, bool, error)
- func (ru *RueidisStore) FindCtx(ctx context.Context, token string) ([]byte, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RueidisStore ¶
type RueidisStore struct {
// contains filtered or unexported fields
}
RueidisStore the session store
func NewWithPrefix ¶
func NewWithPrefix(client rueidis.Client, prefix string) *RueidisStore
NewWithPrefix returns a new RueidisStore instance
func (*RueidisStore) AllCtx ¶
AllCtx returns a map containing the token and data for all active (i.e. not expired) sessions in the RueidisStore instance.
func (*RueidisStore) CommitCtx ¶
func (ru *RueidisStore) CommitCtx(ctx context.Context, token string, b []byte, expiry time.Time) error
CommitCtx adds a session token and data to the RueidisStore instance with the given expiry time. If the session token already exists then the data and expiry time are updated.
func (*RueidisStore) DeleteCtx ¶
func (ru *RueidisStore) DeleteCtx(ctx context.Context, token string) error
DeleteCtx removes a session token and corresponding data from the RueidisStore instance.
Click to show internal directories.
Click to hide internal directories.