2 Copyright 2020 Google LLC
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
15 #include "reftable-writer.h"
17 struct reftable_writer
{
18 ssize_t (*write
)(void *, const void *, size_t);
22 struct reftable_buf last_key
;
23 /* Scratch buffer used to avoid allocations. */
24 struct reftable_buf scratch
;
26 /* offset of next block to write. */
28 uint64_t min_update_index
, max_update_index
;
29 struct reftable_write_options opts
;
31 /* memory buffer for writing */
34 /* writer for the current section. NULL or points to
35 * block_writer_data */
36 struct block_writer
*block_writer
;
38 struct block_writer block_writer_data
;
40 /* pending index records for the current section */
41 struct reftable_index_record
*index
;
46 * tree for use with tsearch; used to populate the 'o' inverse OID
48 struct tree_node
*obj_index_tree
;
50 struct reftable_stats stats
;