(ctx context.Context, key string)
| 131 | } |
| 132 | |
| 133 | func contextRecordFrom(ctx context.Context, key string) contextRecord { |
| 134 | record := contextRecord{ |
| 135 | key: key, |
| 136 | canceled: errors.Is(ctx.Err(), context.Canceled), |
| 137 | } |
| 138 | if value, ok := ctx.Value(markerKey).(string); ok { |
| 139 | record.value = value |
| 140 | } |
| 141 | return record |
| 142 | } |
| 143 | |
| 144 | func (s *contextRecorderLimiterStorage) GetWithContext(ctx context.Context, key string) ([]byte, error) { |
| 145 | s.gets = append(s.gets, contextRecordFrom(ctx, key)) |
no test coverage detected