| 1 | /* |
| 2 | * Copyright 2020 Google LLC |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style |
| 5 | * license that can be found in the LICENSE file or at |
| 6 | * https://developers.google.com/open-source/licenses/bsd |
| 7 | */ |
| 8 | |
| 9 | #ifndef MERGED_H |
| 10 | #define MERGED_H |
| 11 | |
| 12 | #include "system.h" |
| 13 | #include "reftable-basics.h" |
| 14 | |
| 15 | struct reftable_merged_table { |
| 16 | struct reftable_table **tables; |
| 17 | size_t tables_len; |
| 18 | enum reftable_hash hash_id; |
| 19 | |
| 20 | /* If unset, produce deletions. This is useful for compaction. For the |
| 21 | * full stack, deletions should be produced. */ |
| 22 | int suppress_deletions; |
| 23 | |
| 24 | uint64_t min; |
| 25 | uint64_t max; |
| 26 | }; |
| 27 | |
| 28 | struct reftable_iterator; |
| 29 | |
| 30 | int merged_table_init_iter(struct reftable_merged_table *mt, |
| 31 | struct reftable_iterator *it, |
| 32 | uint8_t typ); |
| 33 | |
| 34 | #endif |