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

Function contextRecordFrom

middleware/cache/cache_test.go:209–218  ·  view source on GitHub ↗
(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

207}
208
209func contextRecordFrom(ctx context.Context, key string) contextRecord {
210 record := contextRecord{
211 key: key,
212 canceled: errors.Is(ctx.Err(), context.Canceled),
213 }
214 if value, ok := ctx.Value(markerKey).(string); ok {
215 record.value = value
216 }
217 return record
218}
219
220func (s *contextRecorderStorage) GetWithContext(ctx context.Context, key string) ([]byte, error) {
221 s.gets = append(s.gets, contextRecordFrom(ctx, key))

Callers 3

GetWithContextMethod · 0.70
SetWithContextMethod · 0.70
DeleteWithContextMethod · 0.70

Calls 3

IsMethod · 0.65
ErrMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…