Method
addExchange
(e *Exchange, offset, length int)
Source from the content-addressed store, hash-verified
| 96 | } |
| 97 | |
| 98 | func (is *indexSection) addExchange(e *Exchange, offset, length int) error { |
| 99 | variants := normalizeHeaderValues(e.Response.Header[http.CanonicalHeaderKey("variants")]) |
| 100 | variantKey := normalizeHeaderValues(e.Response.Header[http.CanonicalHeaderKey("variant-key")]) |
| 101 | ent := &indexEntry{ |
| 102 | Request: e.Request, |
| 103 | Variants: variants, |
| 104 | VariantKey: variantKey, |
| 105 | Offset: uint64(offset), |
| 106 | Length: uint64(length), |
| 107 | } |
| 108 | is.es = append(is.es, ent) |
| 109 | return nil |
| 110 | } |
| 111 | |
| 112 | func (is *indexSection) Finalize(ver version.Version) error { |
| 113 | if is.bytes != nil { |