MCPcopy Create free account
hub / github.com/kataras/iris / getBucketForSession

Method getBucketForSession

sessions/sessiondb/boltdb/database.go:90–99  ·  view source on GitHub ↗
(tx *bolt.Tx, sid string)

Source from the content-addressed store, hash-verified

88}
89
90func (db *Database) getBucketForSession(tx *bolt.Tx, sid string) *bolt.Bucket {
91 b := db.getBucket(tx).Bucket([]byte(sid))
92 if b == nil {
93 // session does not exist, it shouldn't happen, session bucket creation happens once at `Acquire`,
94 // no need to accept the `bolt.bucket.CreateBucketIfNotExists`'s performance cost.
95 db.logger.Debugf("unreachable session access for '%s'", sid)
96 }
97
98 return b
99}
100
101var (
102 expirationBucketName = []byte("expiration")

Callers 6

SetMethod · 0.95
DecodeMethod · 0.95
VisitMethod · 0.95
LenMethod · 0.95
DeleteMethod · 0.95
ClearMethod · 0.95

Calls 1

getBucketMethod · 0.95

Tested by

no test coverage detected