Tombstones appends the encoded tombstones to b and returns the resulting slice.
(tstones []tombstones.Stone, b []byte)
| 1013 | |
| 1014 | // Tombstones appends the encoded tombstones to b and returns the resulting slice. |
| 1015 | func (*Encoder) Tombstones(tstones []tombstones.Stone, b []byte) []byte { |
| 1016 | buf := encoding.Encbuf{B: b} |
| 1017 | buf.PutByte(byte(Tombstones)) |
| 1018 | |
| 1019 | for _, s := range tstones { |
| 1020 | for _, iv := range s.Intervals { |
| 1021 | buf.PutBE64(uint64(s.Ref)) |
| 1022 | buf.PutVarint64(iv.Mint) |
| 1023 | buf.PutVarint64(iv.Maxt) |
| 1024 | } |
| 1025 | } |
| 1026 | return buf.Get() |
| 1027 | } |
| 1028 | |
| 1029 | // Exemplars appends the encoded exemplars to b and returns the resulting |
| 1030 | // slice. |