Home / Function/ contextRecordFrom() — fiber Function Reference

contextRecordFrom() — fiber Function Reference

Architecture documentation for the contextRecordFrom() function in limiter_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  9fa87efb_3387_6bde_c143_9610609eeea5["contextRecordFrom()"]
  0509da96_221e_0d0d_fe2e_f2e2e3695b6f["limiter_test.go"]
  9fa87efb_3387_6bde_c143_9610609eeea5 -->|defined in| 0509da96_221e_0d0d_fe2e_f2e2e3695b6f
  style 9fa87efb_3387_6bde_c143_9610609eeea5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/limiter/limiter_test.go lines 100–109

func contextRecordFrom(ctx context.Context, key string) contextRecord {
	record := contextRecord{
		key:      key,
		canceled: errors.Is(ctx.Err(), context.Canceled),
	}
	if value, ok := ctx.Value(markerKey).(string); ok {
		record.value = value
	}
	return record
}

Subdomains

Frequently Asked Questions

What does contextRecordFrom() do?
contextRecordFrom() is a function in the fiber codebase, defined in middleware/limiter/limiter_test.go.
Where is contextRecordFrom() defined?
contextRecordFrom() is defined in middleware/limiter/limiter_test.go at line 100.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free