#238 add GetProvider
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -158,6 +158,11 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) { | ... | @@ -158,6 +158,11 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) { |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | func (manager *Manager) GetProvider(sid string) (sessions SessionStore, err error) { | ||
| 162 | sessions, err = manager.provider.SessionRead(sid) | ||
| 163 | return | ||
| 164 | } | ||
| 165 | |||
| 161 | func (manager *Manager) GC() { | 166 | func (manager *Manager) GC() { |
| 162 | manager.provider.SessionGC() | 167 | manager.provider.SessionGC() |
| 163 | time.AfterFunc(time.Duration(manager.maxlifetime)*time.Second, func() { manager.GC() }) | 168 | time.AfterFunc(time.Duration(manager.maxlifetime)*time.Second, func() { manager.GC() }) | ... | ... |
-
Please register or sign in to post a comment