55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
#ifndef AMDUAT_ASL_PROJECTION_CHECKPOINT_H
|
|
#define AMDUAT_ASL_PROJECTION_CHECKPOINT_H
|
|
|
|
#include "amduat/asl/store.h"
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
enum {
|
|
AMDUAT_ASL_PROJECTION_CHECKPOINT_VERSION_V1 = 1
|
|
};
|
|
|
|
typedef struct {
|
|
uint32_t checkpoint_version;
|
|
amduat_octets_t projection_name;
|
|
uint32_t projection_schema_version;
|
|
bool has_snapshot_id;
|
|
amduat_asl_snapshot_id_t snapshot_id;
|
|
amduat_asl_log_position_t log_position;
|
|
uint64_t created_at;
|
|
amduat_octets_t builder_id;
|
|
bool has_artifact_count;
|
|
uint64_t artifact_count;
|
|
bool has_edge_count;
|
|
uint64_t edge_count;
|
|
bool has_error_count;
|
|
uint64_t error_count;
|
|
bool has_lag_millis;
|
|
uint64_t lag_millis;
|
|
bool has_note;
|
|
amduat_octets_t note;
|
|
} amduat_asl_projection_checkpoint_v1_t;
|
|
|
|
bool amduat_asl_projection_checkpoint_encode_v1(
|
|
const amduat_asl_projection_checkpoint_v1_t *checkpoint,
|
|
amduat_octets_t *out_bytes);
|
|
|
|
bool amduat_asl_projection_checkpoint_decode_v1(
|
|
amduat_octets_t bytes,
|
|
amduat_asl_projection_checkpoint_v1_t *out_checkpoint);
|
|
|
|
void amduat_asl_projection_checkpoint_free(
|
|
amduat_asl_projection_checkpoint_v1_t *checkpoint);
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* AMDUAT_ASL_PROJECTION_CHECKPOINT_H */
|