tests: truncate metadata file for regenerate metadata test
[lttng-tools.git] / src / common / consumer / metadata-bucket.h
CommitLineData
f5ba75b4
JG
1/*
2 * Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef METADATA_BUCKET_H
9#define METADATA_BUCKET_H
10
11#include <common/consumer/consumer.h>
12
13struct metadata_bucket;
14
15typedef ssize_t (*metadata_bucket_flush_cb)(
16 const struct stream_subbuffer *buffer, void *data);
17
18enum metadata_bucket_status {
19 METADATA_BUCKET_STATUS_OK,
20 METADATA_BUCKET_STATUS_ERROR,
21};
22
23struct metadata_bucket *metadata_bucket_create(
24 metadata_bucket_flush_cb flush, void *data);
25
26void metadata_bucket_destroy(struct metadata_bucket *bucket);
27
28enum metadata_bucket_status metadata_bucket_fill(struct metadata_bucket *bucket,
29 const struct stream_subbuffer *buffer);
30
31void metadata_bucket_reset(struct metadata_bucket *bucket);
32
33#endif /* METADATA_BUCKET_H */
34
This page took 0.025254 seconds and 5 git commands to generate.