MCPcopy
hub / github.com/gofiber/fiber / flakySessionStorage

Struct flakySessionStorage

middleware/csrf/csrf_test.go:2575–2581  ·  view source on GitHub ↗

flakySessionStorage is a fiber.Storage whose Get/Set/Delete operations can be configured to fail, so the session-backed manager error paths can be exercised deterministically.

Source from the content-addressed store, hash-verified

2573// configured to fail, so the session-backed manager error paths can be
2574// exercised deterministically.
2575type flakySessionStorage struct {
2576 data map[string][]byte
2577 mu sync.Mutex
2578 failGet bool
2579 failSet bool
2580 failDel bool
2581}
2582
2583func newFlakySessionStorage() *flakySessionStorage {
2584 return &flakySessionStorage{data: make(map[string][]byte)}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected