mirror of
https://github.com/kataras/iris.git
synced 2025-12-27 23:07:03 +00:00
Add "Blogs" | Prev Commit: Update to 8.2.1 | LevelDB-based session database implemented, Read HISTORY.md
Former-commit-id: 1b7b288c1cf1d400f229794a33f3c049054f341f
This commit is contained in:
@@ -2,7 +2,6 @@ package leveldb
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"runtime"
|
||||
|
||||
"github.com/kataras/golog"
|
||||
@@ -59,7 +58,7 @@ func New(directoryPath string) (*Database, error) {
|
||||
return NewFromDB(service)
|
||||
}
|
||||
|
||||
// NewFromDB same as `New` but accepts an already-created custom boltdb connection instead.
|
||||
// NewFromDB same as `New` but accepts an already-created custom leveldb connection instead.
|
||||
func NewFromDB(service *leveldb.DB) (*Database, error) {
|
||||
if service == nil {
|
||||
return nil, errors.New("underline database is missing")
|
||||
@@ -153,7 +152,7 @@ func (db *Database) sync(p sessions.SyncPayload) {
|
||||
|
||||
if p.Action == sessions.ActionDestroy {
|
||||
if err := db.destroy(bsid); err != nil {
|
||||
golog.Errorf("error while destroying a session(%s) from boltdb: %v",
|
||||
golog.Errorf("error while destroying a session(%s) from leveldb: %v",
|
||||
p.SessionID, err)
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user