sui_indexer/backfill/
mod.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use clap::{Subcommand, ValueEnum};
5
6pub mod backfill_instances;
7pub mod backfill_runner;
8pub mod backfill_task;
9
10#[derive(Subcommand, Clone, Debug)]
11pub enum BackfillTaskKind {
12    SystemStateSummaryJson,
13    /// \sql is the SQL string to run, appended with the range between the start and end,
14    /// as well as conflict resolution (see sql_backfill.rs).
15    /// \key_column is the primary key column to use for the range.
16    Sql {
17        sql: String,
18        key_column: String,
19    },
20    /// Starts a backfill pipeline from the ingestion engine.
21    /// \remote_store_url is the URL of the remote store to ingest from.
22    /// Any `IngestionBackfillKind` will need to map to a type that
23    /// implements `IngestionBackfillTrait`.
24    Ingestion {
25        kind: IngestionBackfillKind,
26        remote_store_url: String,
27    },
28}
29
30#[derive(ValueEnum, Clone, Debug)]
31pub enum IngestionBackfillKind {
32    Digest,
33    RawCheckpoints,
34    TxAffectedObjects,
35}