diff --git a/gen-interface.sh b/gen-interface.sh new file mode 100755 index 0000000..850c58b --- /dev/null +++ b/gen-interface.sh @@ -0,0 +1,34 @@ +#! /usr/bin/env bash + +set -e + +NEBULA_THIRDPARYTY_HOME= + +# Parsing options from arguments +while getopts "t:" opt; do + case $opt in + t) + NEBULA_THIRDPARYTY_HOME=${OPTARG} + ;; + \?) + echo "Invalid option: -${OPTARG}" >&2 + exit 1 + ;; + :) + echo "Option -${OPTARG} requires an argument." >&2 + exit 1 + ;; + esac +done + +for mod in common meta storage graph; do + wget https://raw.githubusercontent.com/vesoft-inc/nebula-common/master/src/common/interface/$mod.thrift +done + +for mod in common meta storage graph; do + $NEBULA_THIRDPARYTY_HOME/2.0/bin/thrift1 --strict --allow-neg-enum-vals --gen "mstch_rust" -o ./src/interface/$mod/ $mod.thrift + mv ./src/interface/$mod/gen-rust/lib.rs ./src/interface/$mod + rmdir ./src/interface/$mod/gen-rust +done + +rm common.thrift graph.thrift meta.thrift storage.thrift diff --git a/src/interface/common/lib.rs b/src/interface/common/lib.rs index 6cb51e0..984a703 100644 --- a/src/interface/common/lib.rs +++ b/src/interface/common/lib.rs @@ -32,6 +32,8 @@ pub mod types { pub type SessionID = ::std::primitive::i64; + pub type ExecutionPlanID = ::std::primitive::i64; + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Date { pub year: ::std::primitive::i16, @@ -159,11 +161,29 @@ pub mod types { pub term_id: crate::types::TermID, } + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct DirInfo { + pub root: ::std::vec::Vec<::std::primitive::u8>, + pub data: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, + } + + #[derive(Clone, Debug, PartialEq)] + pub struct NodeInfo { + pub host: crate::types::HostAddr, + pub dir: crate::types::DirInfo, + } + #[derive(Clone, Debug, PartialEq)] pub struct PartitionBackupInfo { pub info: ::std::collections::BTreeMap, } + #[derive(Clone, Debug, PartialEq)] + pub struct CheckpointInfo { + pub partition_info: crate::types::PartitionBackupInfo, + pub path: ::std::vec::Vec<::std::primitive::u8>, + } + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct NullType(pub ::std::primitive::i32); @@ -310,6 +330,783 @@ pub mod types { } } + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] + pub struct ErrorCode(pub ::std::primitive::i32); + + impl ErrorCode { + pub const SUCCEEDED: Self = ErrorCode(0i32); + pub const E_DISCONNECTED: Self = ErrorCode(-1i32); + pub const E_FAIL_TO_CONNECT: Self = ErrorCode(-2i32); + pub const E_RPC_FAILURE: Self = ErrorCode(-3i32); + pub const E_LEADER_CHANGED: Self = ErrorCode(-4i32); + pub const E_SPACE_NOT_FOUND: Self = ErrorCode(-5i32); + pub const E_TAG_NOT_FOUND: Self = ErrorCode(-6i32); + pub const E_EDGE_NOT_FOUND: Self = ErrorCode(-7i32); + pub const E_INDEX_NOT_FOUND: Self = ErrorCode(-8i32); + pub const E_EDGE_PROP_NOT_FOUND: Self = ErrorCode(-9i32); + pub const E_TAG_PROP_NOT_FOUND: Self = ErrorCode(-10i32); + pub const E_ROLE_NOT_FOUND: Self = ErrorCode(-11i32); + pub const E_CONFIG_NOT_FOUND: Self = ErrorCode(-12i32); + pub const E_GROUP_NOT_FOUND: Self = ErrorCode(-13i32); + pub const E_ZONE_NOT_FOUND: Self = ErrorCode(-14i32); + pub const E_LISTENER_NOT_FOUND: Self = ErrorCode(-15i32); + pub const E_PART_NOT_FOUND: Self = ErrorCode(-16i32); + pub const E_KEY_NOT_FOUND: Self = ErrorCode(-17i32); + pub const E_USER_NOT_FOUND: Self = ErrorCode(-18i32); + pub const E_BACKUP_FAILED: Self = ErrorCode(-24i32); + pub const E_BACKUP_EMPTY_TABLE: Self = ErrorCode(-25i32); + pub const E_BACKUP_TABLE_FAILED: Self = ErrorCode(-26i32); + pub const E_PARTIAL_RESULT: Self = ErrorCode(-27i32); + pub const E_REBUILD_INDEX_FAILED: Self = ErrorCode(-28i32); + pub const E_INVALID_PASSWORD: Self = ErrorCode(-29i32); + pub const E_FAILED_GET_ABS_PATH: Self = ErrorCode(-30i32); + pub const E_BAD_USERNAME_PASSWORD: Self = ErrorCode(-1001i32); + pub const E_SESSION_INVALID: Self = ErrorCode(-1002i32); + pub const E_SESSION_TIMEOUT: Self = ErrorCode(-1003i32); + pub const E_SYNTAX_ERROR: Self = ErrorCode(-1004i32); + pub const E_EXECUTION_ERROR: Self = ErrorCode(-1005i32); + pub const E_STATEMENT_EMPTY: Self = ErrorCode(-1006i32); + pub const E_BAD_PERMISSION: Self = ErrorCode(-1008i32); + pub const E_SEMANTIC_ERROR: Self = ErrorCode(-1009i32); + pub const E_TOO_MANY_CONNECTIONS: Self = ErrorCode(-1010i32); + pub const E_PARTIAL_SUCCEEDED: Self = ErrorCode(-1011i32); + pub const E_NO_HOSTS: Self = ErrorCode(-2001i32); + pub const E_EXISTED: Self = ErrorCode(-2002i32); + pub const E_INVALID_HOST: Self = ErrorCode(-2003i32); + pub const E_UNSUPPORTED: Self = ErrorCode(-2004i32); + pub const E_NOT_DROP: Self = ErrorCode(-2005i32); + pub const E_BALANCER_RUNNING: Self = ErrorCode(-2006i32); + pub const E_CONFIG_IMMUTABLE: Self = ErrorCode(-2007i32); + pub const E_CONFLICT: Self = ErrorCode(-2008i32); + pub const E_INVALID_PARM: Self = ErrorCode(-2009i32); + pub const E_WRONGCLUSTER: Self = ErrorCode(-2010i32); + pub const E_STORE_FAILURE: Self = ErrorCode(-2021i32); + pub const E_STORE_SEGMENT_ILLEGAL: Self = ErrorCode(-2022i32); + pub const E_BAD_BALANCE_PLAN: Self = ErrorCode(-2023i32); + pub const E_BALANCED: Self = ErrorCode(-2024i32); + pub const E_NO_RUNNING_BALANCE_PLAN: Self = ErrorCode(-2025i32); + pub const E_NO_VALID_HOST: Self = ErrorCode(-2026i32); + pub const E_CORRUPTTED_BALANCE_PLAN: Self = ErrorCode(-2027i32); + pub const E_NO_INVALID_BALANCE_PLAN: Self = ErrorCode(-2028i32); + pub const E_IMPROPER_ROLE: Self = ErrorCode(-2030i32); + pub const E_INVALID_PARTITION_NUM: Self = ErrorCode(-2031i32); + pub const E_INVALID_REPLICA_FACTOR: Self = ErrorCode(-2032i32); + pub const E_INVALID_CHARSET: Self = ErrorCode(-2033i32); + pub const E_INVALID_COLLATE: Self = ErrorCode(-2034i32); + pub const E_CHARSET_COLLATE_NOT_MATCH: Self = ErrorCode(-2035i32); + pub const E_SNAPSHOT_FAILURE: Self = ErrorCode(-2040i32); + pub const E_BLOCK_WRITE_FAILURE: Self = ErrorCode(-2041i32); + pub const E_REBUILD_INDEX_FAILURE: Self = ErrorCode(-2042i32); + pub const E_INDEX_WITH_TTL: Self = ErrorCode(-2043i32); + pub const E_ADD_JOB_FAILURE: Self = ErrorCode(-2044i32); + pub const E_STOP_JOB_FAILURE: Self = ErrorCode(-2045i32); + pub const E_SAVE_JOB_FAILURE: Self = ErrorCode(-2046i32); + pub const E_BALANCER_FAILURE: Self = ErrorCode(-2047i32); + pub const E_JOB_NOT_FINISHED: Self = ErrorCode(-2048i32); + pub const E_TASK_REPORT_OUT_DATE: Self = ErrorCode(-2049i32); + pub const E_INVALID_JOB: Self = ErrorCode(-2065i32); + pub const E_BACKUP_BUILDING_INDEX: Self = ErrorCode(-2066i32); + pub const E_BACKUP_SPACE_NOT_FOUND: Self = ErrorCode(-2067i32); + pub const E_RESTORE_FAILURE: Self = ErrorCode(-2068i32); + pub const E_SESSION_NOT_FOUND: Self = ErrorCode(-2069i32); + pub const E_LIST_CLUSTER_FAILURE: Self = ErrorCode(-2070i32); + pub const E_LIST_CLUSTER_GET_ABS_PATH_FAILURE: Self = ErrorCode(-2071i32); + pub const E_GET_META_DIR_FAILURE: Self = ErrorCode(-2072i32); + pub const E_QUERY_NOT_FOUND: Self = ErrorCode(-2073i32); + pub const E_CONSENSUS_ERROR: Self = ErrorCode(-3001i32); + pub const E_KEY_HAS_EXISTS: Self = ErrorCode(-3002i32); + pub const E_DATA_TYPE_MISMATCH: Self = ErrorCode(-3003i32); + pub const E_INVALID_FIELD_VALUE: Self = ErrorCode(-3004i32); + pub const E_INVALID_OPERATION: Self = ErrorCode(-3005i32); + pub const E_NOT_NULLABLE: Self = ErrorCode(-3006i32); + pub const E_FIELD_UNSET: Self = ErrorCode(-3007i32); + pub const E_OUT_OF_RANGE: Self = ErrorCode(-3008i32); + pub const E_ATOMIC_OP_FAILED: Self = ErrorCode(-3009i32); + pub const E_DATA_CONFLICT_ERROR: Self = ErrorCode(-3010i32); + pub const E_WRITE_STALLED: Self = ErrorCode(-3011i32); + pub const E_IMPROPER_DATA_TYPE: Self = ErrorCode(-3021i32); + pub const E_INVALID_SPACEVIDLEN: Self = ErrorCode(-3022i32); + pub const E_INVALID_FILTER: Self = ErrorCode(-3031i32); + pub const E_INVALID_UPDATER: Self = ErrorCode(-3032i32); + pub const E_INVALID_STORE: Self = ErrorCode(-3033i32); + pub const E_INVALID_PEER: Self = ErrorCode(-3034i32); + pub const E_RETRY_EXHAUSTED: Self = ErrorCode(-3035i32); + pub const E_TRANSFER_LEADER_FAILED: Self = ErrorCode(-3036i32); + pub const E_INVALID_STAT_TYPE: Self = ErrorCode(-3037i32); + pub const E_INVALID_VID: Self = ErrorCode(-3038i32); + pub const E_NO_TRANSFORMED: Self = ErrorCode(-3039i32); + pub const E_LOAD_META_FAILED: Self = ErrorCode(-3040i32); + pub const E_FAILED_TO_CHECKPOINT: Self = ErrorCode(-3041i32); + pub const E_CHECKPOINT_BLOCKED: Self = ErrorCode(-3042i32); + pub const E_FILTER_OUT: Self = ErrorCode(-3043i32); + pub const E_INVALID_DATA: Self = ErrorCode(-3044i32); + pub const E_MUTATE_EDGE_CONFLICT: Self = ErrorCode(-3045i32); + pub const E_MUTATE_TAG_CONFLICT: Self = ErrorCode(-3046i32); + pub const E_OUTDATED_LOCK: Self = ErrorCode(-3047i32); + pub const E_INVALID_TASK_PARA: Self = ErrorCode(-3051i32); + pub const E_USER_CANCEL: Self = ErrorCode(-3052i32); + pub const E_TASK_EXECUTION_FAILED: Self = ErrorCode(-3053i32); + pub const E_UNKNOWN: Self = ErrorCode(-8000i32); + } + + impl ::fbthrift::ThriftEnum for ErrorCode { + fn enumerate() -> &'static [(ErrorCode, &'static str)] { + &[ + (ErrorCode::SUCCEEDED, "SUCCEEDED"), + (ErrorCode::E_DISCONNECTED, "E_DISCONNECTED"), + (ErrorCode::E_FAIL_TO_CONNECT, "E_FAIL_TO_CONNECT"), + (ErrorCode::E_RPC_FAILURE, "E_RPC_FAILURE"), + (ErrorCode::E_LEADER_CHANGED, "E_LEADER_CHANGED"), + (ErrorCode::E_SPACE_NOT_FOUND, "E_SPACE_NOT_FOUND"), + (ErrorCode::E_TAG_NOT_FOUND, "E_TAG_NOT_FOUND"), + (ErrorCode::E_EDGE_NOT_FOUND, "E_EDGE_NOT_FOUND"), + (ErrorCode::E_INDEX_NOT_FOUND, "E_INDEX_NOT_FOUND"), + (ErrorCode::E_EDGE_PROP_NOT_FOUND, "E_EDGE_PROP_NOT_FOUND"), + (ErrorCode::E_TAG_PROP_NOT_FOUND, "E_TAG_PROP_NOT_FOUND"), + (ErrorCode::E_ROLE_NOT_FOUND, "E_ROLE_NOT_FOUND"), + (ErrorCode::E_CONFIG_NOT_FOUND, "E_CONFIG_NOT_FOUND"), + (ErrorCode::E_GROUP_NOT_FOUND, "E_GROUP_NOT_FOUND"), + (ErrorCode::E_ZONE_NOT_FOUND, "E_ZONE_NOT_FOUND"), + (ErrorCode::E_LISTENER_NOT_FOUND, "E_LISTENER_NOT_FOUND"), + (ErrorCode::E_PART_NOT_FOUND, "E_PART_NOT_FOUND"), + (ErrorCode::E_KEY_NOT_FOUND, "E_KEY_NOT_FOUND"), + (ErrorCode::E_USER_NOT_FOUND, "E_USER_NOT_FOUND"), + (ErrorCode::E_BACKUP_FAILED, "E_BACKUP_FAILED"), + (ErrorCode::E_BACKUP_EMPTY_TABLE, "E_BACKUP_EMPTY_TABLE"), + (ErrorCode::E_BACKUP_TABLE_FAILED, "E_BACKUP_TABLE_FAILED"), + (ErrorCode::E_PARTIAL_RESULT, "E_PARTIAL_RESULT"), + (ErrorCode::E_REBUILD_INDEX_FAILED, "E_REBUILD_INDEX_FAILED"), + (ErrorCode::E_INVALID_PASSWORD, "E_INVALID_PASSWORD"), + (ErrorCode::E_FAILED_GET_ABS_PATH, "E_FAILED_GET_ABS_PATH"), + (ErrorCode::E_BAD_USERNAME_PASSWORD, "E_BAD_USERNAME_PASSWORD"), + (ErrorCode::E_SESSION_INVALID, "E_SESSION_INVALID"), + (ErrorCode::E_SESSION_TIMEOUT, "E_SESSION_TIMEOUT"), + (ErrorCode::E_SYNTAX_ERROR, "E_SYNTAX_ERROR"), + (ErrorCode::E_EXECUTION_ERROR, "E_EXECUTION_ERROR"), + (ErrorCode::E_STATEMENT_EMPTY, "E_STATEMENT_EMPTY"), + (ErrorCode::E_BAD_PERMISSION, "E_BAD_PERMISSION"), + (ErrorCode::E_SEMANTIC_ERROR, "E_SEMANTIC_ERROR"), + (ErrorCode::E_TOO_MANY_CONNECTIONS, "E_TOO_MANY_CONNECTIONS"), + (ErrorCode::E_PARTIAL_SUCCEEDED, "E_PARTIAL_SUCCEEDED"), + (ErrorCode::E_NO_HOSTS, "E_NO_HOSTS"), + (ErrorCode::E_EXISTED, "E_EXISTED"), + (ErrorCode::E_INVALID_HOST, "E_INVALID_HOST"), + (ErrorCode::E_UNSUPPORTED, "E_UNSUPPORTED"), + (ErrorCode::E_NOT_DROP, "E_NOT_DROP"), + (ErrorCode::E_BALANCER_RUNNING, "E_BALANCER_RUNNING"), + (ErrorCode::E_CONFIG_IMMUTABLE, "E_CONFIG_IMMUTABLE"), + (ErrorCode::E_CONFLICT, "E_CONFLICT"), + (ErrorCode::E_INVALID_PARM, "E_INVALID_PARM"), + (ErrorCode::E_WRONGCLUSTER, "E_WRONGCLUSTER"), + (ErrorCode::E_STORE_FAILURE, "E_STORE_FAILURE"), + (ErrorCode::E_STORE_SEGMENT_ILLEGAL, "E_STORE_SEGMENT_ILLEGAL"), + (ErrorCode::E_BAD_BALANCE_PLAN, "E_BAD_BALANCE_PLAN"), + (ErrorCode::E_BALANCED, "E_BALANCED"), + (ErrorCode::E_NO_RUNNING_BALANCE_PLAN, "E_NO_RUNNING_BALANCE_PLAN"), + (ErrorCode::E_NO_VALID_HOST, "E_NO_VALID_HOST"), + (ErrorCode::E_CORRUPTTED_BALANCE_PLAN, "E_CORRUPTTED_BALANCE_PLAN"), + (ErrorCode::E_NO_INVALID_BALANCE_PLAN, "E_NO_INVALID_BALANCE_PLAN"), + (ErrorCode::E_IMPROPER_ROLE, "E_IMPROPER_ROLE"), + (ErrorCode::E_INVALID_PARTITION_NUM, "E_INVALID_PARTITION_NUM"), + (ErrorCode::E_INVALID_REPLICA_FACTOR, "E_INVALID_REPLICA_FACTOR"), + (ErrorCode::E_INVALID_CHARSET, "E_INVALID_CHARSET"), + (ErrorCode::E_INVALID_COLLATE, "E_INVALID_COLLATE"), + (ErrorCode::E_CHARSET_COLLATE_NOT_MATCH, "E_CHARSET_COLLATE_NOT_MATCH"), + (ErrorCode::E_SNAPSHOT_FAILURE, "E_SNAPSHOT_FAILURE"), + (ErrorCode::E_BLOCK_WRITE_FAILURE, "E_BLOCK_WRITE_FAILURE"), + (ErrorCode::E_REBUILD_INDEX_FAILURE, "E_REBUILD_INDEX_FAILURE"), + (ErrorCode::E_INDEX_WITH_TTL, "E_INDEX_WITH_TTL"), + (ErrorCode::E_ADD_JOB_FAILURE, "E_ADD_JOB_FAILURE"), + (ErrorCode::E_STOP_JOB_FAILURE, "E_STOP_JOB_FAILURE"), + (ErrorCode::E_SAVE_JOB_FAILURE, "E_SAVE_JOB_FAILURE"), + (ErrorCode::E_BALANCER_FAILURE, "E_BALANCER_FAILURE"), + (ErrorCode::E_JOB_NOT_FINISHED, "E_JOB_NOT_FINISHED"), + (ErrorCode::E_TASK_REPORT_OUT_DATE, "E_TASK_REPORT_OUT_DATE"), + (ErrorCode::E_INVALID_JOB, "E_INVALID_JOB"), + (ErrorCode::E_BACKUP_BUILDING_INDEX, "E_BACKUP_BUILDING_INDEX"), + (ErrorCode::E_BACKUP_SPACE_NOT_FOUND, "E_BACKUP_SPACE_NOT_FOUND"), + (ErrorCode::E_RESTORE_FAILURE, "E_RESTORE_FAILURE"), + (ErrorCode::E_SESSION_NOT_FOUND, "E_SESSION_NOT_FOUND"), + (ErrorCode::E_LIST_CLUSTER_FAILURE, "E_LIST_CLUSTER_FAILURE"), + (ErrorCode::E_LIST_CLUSTER_GET_ABS_PATH_FAILURE, "E_LIST_CLUSTER_GET_ABS_PATH_FAILURE"), + (ErrorCode::E_GET_META_DIR_FAILURE, "E_GET_META_DIR_FAILURE"), + (ErrorCode::E_QUERY_NOT_FOUND, "E_QUERY_NOT_FOUND"), + (ErrorCode::E_CONSENSUS_ERROR, "E_CONSENSUS_ERROR"), + (ErrorCode::E_KEY_HAS_EXISTS, "E_KEY_HAS_EXISTS"), + (ErrorCode::E_DATA_TYPE_MISMATCH, "E_DATA_TYPE_MISMATCH"), + (ErrorCode::E_INVALID_FIELD_VALUE, "E_INVALID_FIELD_VALUE"), + (ErrorCode::E_INVALID_OPERATION, "E_INVALID_OPERATION"), + (ErrorCode::E_NOT_NULLABLE, "E_NOT_NULLABLE"), + (ErrorCode::E_FIELD_UNSET, "E_FIELD_UNSET"), + (ErrorCode::E_OUT_OF_RANGE, "E_OUT_OF_RANGE"), + (ErrorCode::E_ATOMIC_OP_FAILED, "E_ATOMIC_OP_FAILED"), + (ErrorCode::E_DATA_CONFLICT_ERROR, "E_DATA_CONFLICT_ERROR"), + (ErrorCode::E_WRITE_STALLED, "E_WRITE_STALLED"), + (ErrorCode::E_IMPROPER_DATA_TYPE, "E_IMPROPER_DATA_TYPE"), + (ErrorCode::E_INVALID_SPACEVIDLEN, "E_INVALID_SPACEVIDLEN"), + (ErrorCode::E_INVALID_FILTER, "E_INVALID_FILTER"), + (ErrorCode::E_INVALID_UPDATER, "E_INVALID_UPDATER"), + (ErrorCode::E_INVALID_STORE, "E_INVALID_STORE"), + (ErrorCode::E_INVALID_PEER, "E_INVALID_PEER"), + (ErrorCode::E_RETRY_EXHAUSTED, "E_RETRY_EXHAUSTED"), + (ErrorCode::E_TRANSFER_LEADER_FAILED, "E_TRANSFER_LEADER_FAILED"), + (ErrorCode::E_INVALID_STAT_TYPE, "E_INVALID_STAT_TYPE"), + (ErrorCode::E_INVALID_VID, "E_INVALID_VID"), + (ErrorCode::E_NO_TRANSFORMED, "E_NO_TRANSFORMED"), + (ErrorCode::E_LOAD_META_FAILED, "E_LOAD_META_FAILED"), + (ErrorCode::E_FAILED_TO_CHECKPOINT, "E_FAILED_TO_CHECKPOINT"), + (ErrorCode::E_CHECKPOINT_BLOCKED, "E_CHECKPOINT_BLOCKED"), + (ErrorCode::E_FILTER_OUT, "E_FILTER_OUT"), + (ErrorCode::E_INVALID_DATA, "E_INVALID_DATA"), + (ErrorCode::E_MUTATE_EDGE_CONFLICT, "E_MUTATE_EDGE_CONFLICT"), + (ErrorCode::E_MUTATE_TAG_CONFLICT, "E_MUTATE_TAG_CONFLICT"), + (ErrorCode::E_OUTDATED_LOCK, "E_OUTDATED_LOCK"), + (ErrorCode::E_INVALID_TASK_PARA, "E_INVALID_TASK_PARA"), + (ErrorCode::E_USER_CANCEL, "E_USER_CANCEL"), + (ErrorCode::E_TASK_EXECUTION_FAILED, "E_TASK_EXECUTION_FAILED"), + (ErrorCode::E_UNKNOWN, "E_UNKNOWN"), + ] + } + + fn variants() -> &'static [&'static str] { + &[ + "SUCCEEDED", + "E_DISCONNECTED", + "E_FAIL_TO_CONNECT", + "E_RPC_FAILURE", + "E_LEADER_CHANGED", + "E_SPACE_NOT_FOUND", + "E_TAG_NOT_FOUND", + "E_EDGE_NOT_FOUND", + "E_INDEX_NOT_FOUND", + "E_EDGE_PROP_NOT_FOUND", + "E_TAG_PROP_NOT_FOUND", + "E_ROLE_NOT_FOUND", + "E_CONFIG_NOT_FOUND", + "E_GROUP_NOT_FOUND", + "E_ZONE_NOT_FOUND", + "E_LISTENER_NOT_FOUND", + "E_PART_NOT_FOUND", + "E_KEY_NOT_FOUND", + "E_USER_NOT_FOUND", + "E_BACKUP_FAILED", + "E_BACKUP_EMPTY_TABLE", + "E_BACKUP_TABLE_FAILED", + "E_PARTIAL_RESULT", + "E_REBUILD_INDEX_FAILED", + "E_INVALID_PASSWORD", + "E_FAILED_GET_ABS_PATH", + "E_BAD_USERNAME_PASSWORD", + "E_SESSION_INVALID", + "E_SESSION_TIMEOUT", + "E_SYNTAX_ERROR", + "E_EXECUTION_ERROR", + "E_STATEMENT_EMPTY", + "E_BAD_PERMISSION", + "E_SEMANTIC_ERROR", + "E_TOO_MANY_CONNECTIONS", + "E_PARTIAL_SUCCEEDED", + "E_NO_HOSTS", + "E_EXISTED", + "E_INVALID_HOST", + "E_UNSUPPORTED", + "E_NOT_DROP", + "E_BALANCER_RUNNING", + "E_CONFIG_IMMUTABLE", + "E_CONFLICT", + "E_INVALID_PARM", + "E_WRONGCLUSTER", + "E_STORE_FAILURE", + "E_STORE_SEGMENT_ILLEGAL", + "E_BAD_BALANCE_PLAN", + "E_BALANCED", + "E_NO_RUNNING_BALANCE_PLAN", + "E_NO_VALID_HOST", + "E_CORRUPTTED_BALANCE_PLAN", + "E_NO_INVALID_BALANCE_PLAN", + "E_IMPROPER_ROLE", + "E_INVALID_PARTITION_NUM", + "E_INVALID_REPLICA_FACTOR", + "E_INVALID_CHARSET", + "E_INVALID_COLLATE", + "E_CHARSET_COLLATE_NOT_MATCH", + "E_SNAPSHOT_FAILURE", + "E_BLOCK_WRITE_FAILURE", + "E_REBUILD_INDEX_FAILURE", + "E_INDEX_WITH_TTL", + "E_ADD_JOB_FAILURE", + "E_STOP_JOB_FAILURE", + "E_SAVE_JOB_FAILURE", + "E_BALANCER_FAILURE", + "E_JOB_NOT_FINISHED", + "E_TASK_REPORT_OUT_DATE", + "E_INVALID_JOB", + "E_BACKUP_BUILDING_INDEX", + "E_BACKUP_SPACE_NOT_FOUND", + "E_RESTORE_FAILURE", + "E_SESSION_NOT_FOUND", + "E_LIST_CLUSTER_FAILURE", + "E_LIST_CLUSTER_GET_ABS_PATH_FAILURE", + "E_GET_META_DIR_FAILURE", + "E_QUERY_NOT_FOUND", + "E_CONSENSUS_ERROR", + "E_KEY_HAS_EXISTS", + "E_DATA_TYPE_MISMATCH", + "E_INVALID_FIELD_VALUE", + "E_INVALID_OPERATION", + "E_NOT_NULLABLE", + "E_FIELD_UNSET", + "E_OUT_OF_RANGE", + "E_ATOMIC_OP_FAILED", + "E_DATA_CONFLICT_ERROR", + "E_WRITE_STALLED", + "E_IMPROPER_DATA_TYPE", + "E_INVALID_SPACEVIDLEN", + "E_INVALID_FILTER", + "E_INVALID_UPDATER", + "E_INVALID_STORE", + "E_INVALID_PEER", + "E_RETRY_EXHAUSTED", + "E_TRANSFER_LEADER_FAILED", + "E_INVALID_STAT_TYPE", + "E_INVALID_VID", + "E_NO_TRANSFORMED", + "E_LOAD_META_FAILED", + "E_FAILED_TO_CHECKPOINT", + "E_CHECKPOINT_BLOCKED", + "E_FILTER_OUT", + "E_INVALID_DATA", + "E_MUTATE_EDGE_CONFLICT", + "E_MUTATE_TAG_CONFLICT", + "E_OUTDATED_LOCK", + "E_INVALID_TASK_PARA", + "E_USER_CANCEL", + "E_TASK_EXECUTION_FAILED", + "E_UNKNOWN", + ] + } + + fn variant_values() -> &'static [ErrorCode] { + &[ + ErrorCode::SUCCEEDED, + ErrorCode::E_DISCONNECTED, + ErrorCode::E_FAIL_TO_CONNECT, + ErrorCode::E_RPC_FAILURE, + ErrorCode::E_LEADER_CHANGED, + ErrorCode::E_SPACE_NOT_FOUND, + ErrorCode::E_TAG_NOT_FOUND, + ErrorCode::E_EDGE_NOT_FOUND, + ErrorCode::E_INDEX_NOT_FOUND, + ErrorCode::E_EDGE_PROP_NOT_FOUND, + ErrorCode::E_TAG_PROP_NOT_FOUND, + ErrorCode::E_ROLE_NOT_FOUND, + ErrorCode::E_CONFIG_NOT_FOUND, + ErrorCode::E_GROUP_NOT_FOUND, + ErrorCode::E_ZONE_NOT_FOUND, + ErrorCode::E_LISTENER_NOT_FOUND, + ErrorCode::E_PART_NOT_FOUND, + ErrorCode::E_KEY_NOT_FOUND, + ErrorCode::E_USER_NOT_FOUND, + ErrorCode::E_BACKUP_FAILED, + ErrorCode::E_BACKUP_EMPTY_TABLE, + ErrorCode::E_BACKUP_TABLE_FAILED, + ErrorCode::E_PARTIAL_RESULT, + ErrorCode::E_REBUILD_INDEX_FAILED, + ErrorCode::E_INVALID_PASSWORD, + ErrorCode::E_FAILED_GET_ABS_PATH, + ErrorCode::E_BAD_USERNAME_PASSWORD, + ErrorCode::E_SESSION_INVALID, + ErrorCode::E_SESSION_TIMEOUT, + ErrorCode::E_SYNTAX_ERROR, + ErrorCode::E_EXECUTION_ERROR, + ErrorCode::E_STATEMENT_EMPTY, + ErrorCode::E_BAD_PERMISSION, + ErrorCode::E_SEMANTIC_ERROR, + ErrorCode::E_TOO_MANY_CONNECTIONS, + ErrorCode::E_PARTIAL_SUCCEEDED, + ErrorCode::E_NO_HOSTS, + ErrorCode::E_EXISTED, + ErrorCode::E_INVALID_HOST, + ErrorCode::E_UNSUPPORTED, + ErrorCode::E_NOT_DROP, + ErrorCode::E_BALANCER_RUNNING, + ErrorCode::E_CONFIG_IMMUTABLE, + ErrorCode::E_CONFLICT, + ErrorCode::E_INVALID_PARM, + ErrorCode::E_WRONGCLUSTER, + ErrorCode::E_STORE_FAILURE, + ErrorCode::E_STORE_SEGMENT_ILLEGAL, + ErrorCode::E_BAD_BALANCE_PLAN, + ErrorCode::E_BALANCED, + ErrorCode::E_NO_RUNNING_BALANCE_PLAN, + ErrorCode::E_NO_VALID_HOST, + ErrorCode::E_CORRUPTTED_BALANCE_PLAN, + ErrorCode::E_NO_INVALID_BALANCE_PLAN, + ErrorCode::E_IMPROPER_ROLE, + ErrorCode::E_INVALID_PARTITION_NUM, + ErrorCode::E_INVALID_REPLICA_FACTOR, + ErrorCode::E_INVALID_CHARSET, + ErrorCode::E_INVALID_COLLATE, + ErrorCode::E_CHARSET_COLLATE_NOT_MATCH, + ErrorCode::E_SNAPSHOT_FAILURE, + ErrorCode::E_BLOCK_WRITE_FAILURE, + ErrorCode::E_REBUILD_INDEX_FAILURE, + ErrorCode::E_INDEX_WITH_TTL, + ErrorCode::E_ADD_JOB_FAILURE, + ErrorCode::E_STOP_JOB_FAILURE, + ErrorCode::E_SAVE_JOB_FAILURE, + ErrorCode::E_BALANCER_FAILURE, + ErrorCode::E_JOB_NOT_FINISHED, + ErrorCode::E_TASK_REPORT_OUT_DATE, + ErrorCode::E_INVALID_JOB, + ErrorCode::E_BACKUP_BUILDING_INDEX, + ErrorCode::E_BACKUP_SPACE_NOT_FOUND, + ErrorCode::E_RESTORE_FAILURE, + ErrorCode::E_SESSION_NOT_FOUND, + ErrorCode::E_LIST_CLUSTER_FAILURE, + ErrorCode::E_LIST_CLUSTER_GET_ABS_PATH_FAILURE, + ErrorCode::E_GET_META_DIR_FAILURE, + ErrorCode::E_QUERY_NOT_FOUND, + ErrorCode::E_CONSENSUS_ERROR, + ErrorCode::E_KEY_HAS_EXISTS, + ErrorCode::E_DATA_TYPE_MISMATCH, + ErrorCode::E_INVALID_FIELD_VALUE, + ErrorCode::E_INVALID_OPERATION, + ErrorCode::E_NOT_NULLABLE, + ErrorCode::E_FIELD_UNSET, + ErrorCode::E_OUT_OF_RANGE, + ErrorCode::E_ATOMIC_OP_FAILED, + ErrorCode::E_DATA_CONFLICT_ERROR, + ErrorCode::E_WRITE_STALLED, + ErrorCode::E_IMPROPER_DATA_TYPE, + ErrorCode::E_INVALID_SPACEVIDLEN, + ErrorCode::E_INVALID_FILTER, + ErrorCode::E_INVALID_UPDATER, + ErrorCode::E_INVALID_STORE, + ErrorCode::E_INVALID_PEER, + ErrorCode::E_RETRY_EXHAUSTED, + ErrorCode::E_TRANSFER_LEADER_FAILED, + ErrorCode::E_INVALID_STAT_TYPE, + ErrorCode::E_INVALID_VID, + ErrorCode::E_NO_TRANSFORMED, + ErrorCode::E_LOAD_META_FAILED, + ErrorCode::E_FAILED_TO_CHECKPOINT, + ErrorCode::E_CHECKPOINT_BLOCKED, + ErrorCode::E_FILTER_OUT, + ErrorCode::E_INVALID_DATA, + ErrorCode::E_MUTATE_EDGE_CONFLICT, + ErrorCode::E_MUTATE_TAG_CONFLICT, + ErrorCode::E_OUTDATED_LOCK, + ErrorCode::E_INVALID_TASK_PARA, + ErrorCode::E_USER_CANCEL, + ErrorCode::E_TASK_EXECUTION_FAILED, + ErrorCode::E_UNKNOWN, + ] + } + } + + impl ::std::default::Default for ErrorCode { + fn default() -> Self { + ErrorCode(::fbthrift::__UNKNOWN_ID) + } + } + + impl<'a> ::std::convert::From<&'a ErrorCode> for ::std::primitive::i32 { + #[inline] + fn from(x: &'a ErrorCode) -> Self { + x.0 + } + } + + impl ::std::convert::From for ::std::primitive::i32 { + #[inline] + fn from(x: ErrorCode) -> Self { + x.0 + } + } + + impl ::std::convert::From<::std::primitive::i32> for ErrorCode { + #[inline] + fn from(x: ::std::primitive::i32) -> Self { + Self(x) + } + } + + impl ::std::fmt::Display for ErrorCode { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + static VARIANTS_BY_NUMBER: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ + ("E_UNKNOWN", -8000), + ("E_TASK_EXECUTION_FAILED", -3053), + ("E_USER_CANCEL", -3052), + ("E_INVALID_TASK_PARA", -3051), + ("E_OUTDATED_LOCK", -3047), + ("E_MUTATE_TAG_CONFLICT", -3046), + ("E_MUTATE_EDGE_CONFLICT", -3045), + ("E_INVALID_DATA", -3044), + ("E_FILTER_OUT", -3043), + ("E_CHECKPOINT_BLOCKED", -3042), + ("E_FAILED_TO_CHECKPOINT", -3041), + ("E_LOAD_META_FAILED", -3040), + ("E_NO_TRANSFORMED", -3039), + ("E_INVALID_VID", -3038), + ("E_INVALID_STAT_TYPE", -3037), + ("E_TRANSFER_LEADER_FAILED", -3036), + ("E_RETRY_EXHAUSTED", -3035), + ("E_INVALID_PEER", -3034), + ("E_INVALID_STORE", -3033), + ("E_INVALID_UPDATER", -3032), + ("E_INVALID_FILTER", -3031), + ("E_INVALID_SPACEVIDLEN", -3022), + ("E_IMPROPER_DATA_TYPE", -3021), + ("E_WRITE_STALLED", -3011), + ("E_DATA_CONFLICT_ERROR", -3010), + ("E_ATOMIC_OP_FAILED", -3009), + ("E_OUT_OF_RANGE", -3008), + ("E_FIELD_UNSET", -3007), + ("E_NOT_NULLABLE", -3006), + ("E_INVALID_OPERATION", -3005), + ("E_INVALID_FIELD_VALUE", -3004), + ("E_DATA_TYPE_MISMATCH", -3003), + ("E_KEY_HAS_EXISTS", -3002), + ("E_CONSENSUS_ERROR", -3001), + ("E_QUERY_NOT_FOUND", -2073), + ("E_GET_META_DIR_FAILURE", -2072), + ("E_LIST_CLUSTER_GET_ABS_PATH_FAILURE", -2071), + ("E_LIST_CLUSTER_FAILURE", -2070), + ("E_SESSION_NOT_FOUND", -2069), + ("E_RESTORE_FAILURE", -2068), + ("E_BACKUP_SPACE_NOT_FOUND", -2067), + ("E_BACKUP_BUILDING_INDEX", -2066), + ("E_INVALID_JOB", -2065), + ("E_TASK_REPORT_OUT_DATE", -2049), + ("E_JOB_NOT_FINISHED", -2048), + ("E_BALANCER_FAILURE", -2047), + ("E_SAVE_JOB_FAILURE", -2046), + ("E_STOP_JOB_FAILURE", -2045), + ("E_ADD_JOB_FAILURE", -2044), + ("E_INDEX_WITH_TTL", -2043), + ("E_REBUILD_INDEX_FAILURE", -2042), + ("E_BLOCK_WRITE_FAILURE", -2041), + ("E_SNAPSHOT_FAILURE", -2040), + ("E_CHARSET_COLLATE_NOT_MATCH", -2035), + ("E_INVALID_COLLATE", -2034), + ("E_INVALID_CHARSET", -2033), + ("E_INVALID_REPLICA_FACTOR", -2032), + ("E_INVALID_PARTITION_NUM", -2031), + ("E_IMPROPER_ROLE", -2030), + ("E_NO_INVALID_BALANCE_PLAN", -2028), + ("E_CORRUPTTED_BALANCE_PLAN", -2027), + ("E_NO_VALID_HOST", -2026), + ("E_NO_RUNNING_BALANCE_PLAN", -2025), + ("E_BALANCED", -2024), + ("E_BAD_BALANCE_PLAN", -2023), + ("E_STORE_SEGMENT_ILLEGAL", -2022), + ("E_STORE_FAILURE", -2021), + ("E_WRONGCLUSTER", -2010), + ("E_INVALID_PARM", -2009), + ("E_CONFLICT", -2008), + ("E_CONFIG_IMMUTABLE", -2007), + ("E_BALANCER_RUNNING", -2006), + ("E_NOT_DROP", -2005), + ("E_UNSUPPORTED", -2004), + ("E_INVALID_HOST", -2003), + ("E_EXISTED", -2002), + ("E_NO_HOSTS", -2001), + ("E_PARTIAL_SUCCEEDED", -1011), + ("E_TOO_MANY_CONNECTIONS", -1010), + ("E_SEMANTIC_ERROR", -1009), + ("E_BAD_PERMISSION", -1008), + ("E_STATEMENT_EMPTY", -1006), + ("E_EXECUTION_ERROR", -1005), + ("E_SYNTAX_ERROR", -1004), + ("E_SESSION_TIMEOUT", -1003), + ("E_SESSION_INVALID", -1002), + ("E_BAD_USERNAME_PASSWORD", -1001), + ("E_FAILED_GET_ABS_PATH", -30), + ("E_INVALID_PASSWORD", -29), + ("E_REBUILD_INDEX_FAILED", -28), + ("E_PARTIAL_RESULT", -27), + ("E_BACKUP_TABLE_FAILED", -26), + ("E_BACKUP_EMPTY_TABLE", -25), + ("E_BACKUP_FAILED", -24), + ("E_USER_NOT_FOUND", -18), + ("E_KEY_NOT_FOUND", -17), + ("E_PART_NOT_FOUND", -16), + ("E_LISTENER_NOT_FOUND", -15), + ("E_ZONE_NOT_FOUND", -14), + ("E_GROUP_NOT_FOUND", -13), + ("E_CONFIG_NOT_FOUND", -12), + ("E_ROLE_NOT_FOUND", -11), + ("E_TAG_PROP_NOT_FOUND", -10), + ("E_EDGE_PROP_NOT_FOUND", -9), + ("E_INDEX_NOT_FOUND", -8), + ("E_EDGE_NOT_FOUND", -7), + ("E_TAG_NOT_FOUND", -6), + ("E_SPACE_NOT_FOUND", -5), + ("E_LEADER_CHANGED", -4), + ("E_RPC_FAILURE", -3), + ("E_FAIL_TO_CONNECT", -2), + ("E_DISCONNECTED", -1), + ("SUCCEEDED", 0), + ]; + ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) + } + } + + impl ::std::fmt::Debug for ErrorCode { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(fmt, "ErrorCode::{}", self) + } + } + + impl ::std::str::FromStr for ErrorCode { + type Err = ::anyhow::Error; + + fn from_str(string: &::std::primitive::str) -> ::std::result::Result { + static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ + ("E_ADD_JOB_FAILURE", -2044), + ("E_ATOMIC_OP_FAILED", -3009), + ("E_BACKUP_BUILDING_INDEX", -2066), + ("E_BACKUP_EMPTY_TABLE", -25), + ("E_BACKUP_FAILED", -24), + ("E_BACKUP_SPACE_NOT_FOUND", -2067), + ("E_BACKUP_TABLE_FAILED", -26), + ("E_BAD_BALANCE_PLAN", -2023), + ("E_BAD_PERMISSION", -1008), + ("E_BAD_USERNAME_PASSWORD", -1001), + ("E_BALANCED", -2024), + ("E_BALANCER_FAILURE", -2047), + ("E_BALANCER_RUNNING", -2006), + ("E_BLOCK_WRITE_FAILURE", -2041), + ("E_CHARSET_COLLATE_NOT_MATCH", -2035), + ("E_CHECKPOINT_BLOCKED", -3042), + ("E_CONFIG_IMMUTABLE", -2007), + ("E_CONFIG_NOT_FOUND", -12), + ("E_CONFLICT", -2008), + ("E_CONSENSUS_ERROR", -3001), + ("E_CORRUPTTED_BALANCE_PLAN", -2027), + ("E_DATA_CONFLICT_ERROR", -3010), + ("E_DATA_TYPE_MISMATCH", -3003), + ("E_DISCONNECTED", -1), + ("E_EDGE_NOT_FOUND", -7), + ("E_EDGE_PROP_NOT_FOUND", -9), + ("E_EXECUTION_ERROR", -1005), + ("E_EXISTED", -2002), + ("E_FAILED_GET_ABS_PATH", -30), + ("E_FAILED_TO_CHECKPOINT", -3041), + ("E_FAIL_TO_CONNECT", -2), + ("E_FIELD_UNSET", -3007), + ("E_FILTER_OUT", -3043), + ("E_GET_META_DIR_FAILURE", -2072), + ("E_GROUP_NOT_FOUND", -13), + ("E_IMPROPER_DATA_TYPE", -3021), + ("E_IMPROPER_ROLE", -2030), + ("E_INDEX_NOT_FOUND", -8), + ("E_INDEX_WITH_TTL", -2043), + ("E_INVALID_CHARSET", -2033), + ("E_INVALID_COLLATE", -2034), + ("E_INVALID_DATA", -3044), + ("E_INVALID_FIELD_VALUE", -3004), + ("E_INVALID_FILTER", -3031), + ("E_INVALID_HOST", -2003), + ("E_INVALID_JOB", -2065), + ("E_INVALID_OPERATION", -3005), + ("E_INVALID_PARM", -2009), + ("E_INVALID_PARTITION_NUM", -2031), + ("E_INVALID_PASSWORD", -29), + ("E_INVALID_PEER", -3034), + ("E_INVALID_REPLICA_FACTOR", -2032), + ("E_INVALID_SPACEVIDLEN", -3022), + ("E_INVALID_STAT_TYPE", -3037), + ("E_INVALID_STORE", -3033), + ("E_INVALID_TASK_PARA", -3051), + ("E_INVALID_UPDATER", -3032), + ("E_INVALID_VID", -3038), + ("E_JOB_NOT_FINISHED", -2048), + ("E_KEY_HAS_EXISTS", -3002), + ("E_KEY_NOT_FOUND", -17), + ("E_LEADER_CHANGED", -4), + ("E_LISTENER_NOT_FOUND", -15), + ("E_LIST_CLUSTER_FAILURE", -2070), + ("E_LIST_CLUSTER_GET_ABS_PATH_FAILURE", -2071), + ("E_LOAD_META_FAILED", -3040), + ("E_MUTATE_EDGE_CONFLICT", -3045), + ("E_MUTATE_TAG_CONFLICT", -3046), + ("E_NOT_DROP", -2005), + ("E_NOT_NULLABLE", -3006), + ("E_NO_HOSTS", -2001), + ("E_NO_INVALID_BALANCE_PLAN", -2028), + ("E_NO_RUNNING_BALANCE_PLAN", -2025), + ("E_NO_TRANSFORMED", -3039), + ("E_NO_VALID_HOST", -2026), + ("E_OUTDATED_LOCK", -3047), + ("E_OUT_OF_RANGE", -3008), + ("E_PARTIAL_RESULT", -27), + ("E_PARTIAL_SUCCEEDED", -1011), + ("E_PART_NOT_FOUND", -16), + ("E_QUERY_NOT_FOUND", -2073), + ("E_REBUILD_INDEX_FAILED", -28), + ("E_REBUILD_INDEX_FAILURE", -2042), + ("E_RESTORE_FAILURE", -2068), + ("E_RETRY_EXHAUSTED", -3035), + ("E_ROLE_NOT_FOUND", -11), + ("E_RPC_FAILURE", -3), + ("E_SAVE_JOB_FAILURE", -2046), + ("E_SEMANTIC_ERROR", -1009), + ("E_SESSION_INVALID", -1002), + ("E_SESSION_NOT_FOUND", -2069), + ("E_SESSION_TIMEOUT", -1003), + ("E_SNAPSHOT_FAILURE", -2040), + ("E_SPACE_NOT_FOUND", -5), + ("E_STATEMENT_EMPTY", -1006), + ("E_STOP_JOB_FAILURE", -2045), + ("E_STORE_FAILURE", -2021), + ("E_STORE_SEGMENT_ILLEGAL", -2022), + ("E_SYNTAX_ERROR", -1004), + ("E_TAG_NOT_FOUND", -6), + ("E_TAG_PROP_NOT_FOUND", -10), + ("E_TASK_EXECUTION_FAILED", -3053), + ("E_TASK_REPORT_OUT_DATE", -2049), + ("E_TOO_MANY_CONNECTIONS", -1010), + ("E_TRANSFER_LEADER_FAILED", -3036), + ("E_UNKNOWN", -8000), + ("E_UNSUPPORTED", -2004), + ("E_USER_CANCEL", -3052), + ("E_USER_NOT_FOUND", -18), + ("E_WRITE_STALLED", -3011), + ("E_WRONGCLUSTER", -2010), + ("E_ZONE_NOT_FOUND", -14), + ("SUCCEEDED", 0), + ]; + ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "ErrorCode").map(ErrorCode) + } + } + + impl ::fbthrift::GetTType for ErrorCode { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::I32; + } + + impl

::fbthrift::Serialize

for ErrorCode + where + P: ::fbthrift::ProtocolWriter, + { + #[inline] + fn write(&self, p: &mut P) { + p.write_i32(self.into()) + } + } + + impl

::fbthrift::Deserialize

for ErrorCode + where + P: ::fbthrift::ProtocolReader, + { + #[inline] + fn read(p: &mut P) -> ::anyhow::Result { + ::std::result::Result::Ok(ErrorCode::from(p.read_i32()?)) + } + } + + @@ -1644,6 +2441,134 @@ pub mod types { } + impl ::std::default::Default for self::DirInfo { + fn default() -> Self { + Self { + root: ::std::default::Default::default(), + data: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::DirInfo {} + unsafe impl ::std::marker::Sync for self::DirInfo {} + + impl ::fbthrift::GetTType for self::DirInfo { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::DirInfo + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("DirInfo"); + p.write_field_begin("root", ::fbthrift::TType::String, 1); + ::fbthrift::Serialize::write(&self.root, p); + p.write_field_end(); + p.write_field_begin("data", ::fbthrift::TType::List, 2); + ::fbthrift::Serialize::write(&self.data, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::DirInfo + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("data", ::fbthrift::TType::List, 2), + ::fbthrift::Field::new("root", ::fbthrift::TType::String, 1), + ]; + let mut field_root = ::std::option::Option::None; + let mut field_data = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::String, 1) => field_root = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 2) => field_data = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + root: field_root.unwrap_or_default(), + data: field_data.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::NodeInfo { + fn default() -> Self { + Self { + host: ::std::default::Default::default(), + dir: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::NodeInfo {} + unsafe impl ::std::marker::Sync for self::NodeInfo {} + + impl ::fbthrift::GetTType for self::NodeInfo { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::NodeInfo + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("NodeInfo"); + p.write_field_begin("host", ::fbthrift::TType::Struct, 1); + ::fbthrift::Serialize::write(&self.host, p); + p.write_field_end(); + p.write_field_begin("dir", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.dir, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::NodeInfo + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("dir", ::fbthrift::TType::Struct, 2), + ::fbthrift::Field::new("host", ::fbthrift::TType::Struct, 1), + ]; + let mut field_host = ::std::option::Option::None; + let mut field_dir = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_host = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_dir = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + host: field_host.unwrap_or_default(), + dir: field_dir.unwrap_or_default(), + }) + } + } + + impl ::std::default::Default for self::PartitionBackupInfo { fn default() -> Self { Self { @@ -1699,6 +2624,70 @@ pub mod types { } } + + impl ::std::default::Default for self::CheckpointInfo { + fn default() -> Self { + Self { + partition_info: ::std::default::Default::default(), + path: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::CheckpointInfo {} + unsafe impl ::std::marker::Sync for self::CheckpointInfo {} + + impl ::fbthrift::GetTType for self::CheckpointInfo { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::CheckpointInfo + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("CheckpointInfo"); + p.write_field_begin("partition_info", ::fbthrift::TType::Struct, 1); + ::fbthrift::Serialize::write(&self.partition_info, p); + p.write_field_end(); + p.write_field_begin("path", ::fbthrift::TType::String, 2); + ::fbthrift::Serialize::write(&self.path, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::CheckpointInfo + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("partition_info", ::fbthrift::TType::Struct, 1), + ::fbthrift::Field::new("path", ::fbthrift::TType::String, 2), + ]; + let mut field_partition_info = ::std::option::Option::None; + let mut field_path = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_partition_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 2) => field_path = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + partition_info: field_partition_info.unwrap_or_default(), + path: field_path.unwrap_or_default(), + }) + } + } + } pub mod errors { diff --git a/src/interface/graph/lib.rs b/src/interface/graph/lib.rs index 1ab9f21..bc5f4d8 100644 --- a/src/interface/graph/lib.rs +++ b/src/interface/graph/lib.rs @@ -51,7 +51,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ExecutionResponse { - pub error_code: crate::types::ErrorCode, + pub error_code: common::types::ErrorCode, pub latency_in_us: ::std::primitive::i32, pub data: ::std::option::Option, pub space_name: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, @@ -62,197 +62,11 @@ pub mod types { #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct AuthResponse { - pub error_code: crate::types::ErrorCode, + pub error_code: common::types::ErrorCode, pub error_msg: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, pub session_id: ::std::option::Option<::std::primitive::i64>, - } - - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] - pub struct ErrorCode(pub ::std::primitive::i32); - - impl ErrorCode { - pub const SUCCEEDED: Self = ErrorCode(0i32); - pub const E_DISCONNECTED: Self = ErrorCode(-1i32); - pub const E_FAIL_TO_CONNECT: Self = ErrorCode(-2i32); - pub const E_RPC_FAILURE: Self = ErrorCode(-3i32); - pub const E_BAD_USERNAME_PASSWORD: Self = ErrorCode(-4i32); - pub const E_SESSION_INVALID: Self = ErrorCode(-5i32); - pub const E_SESSION_TIMEOUT: Self = ErrorCode(-6i32); - pub const E_SYNTAX_ERROR: Self = ErrorCode(-7i32); - pub const E_EXECUTION_ERROR: Self = ErrorCode(-8i32); - pub const E_STATEMENT_EMPTY: Self = ErrorCode(-9i32); - pub const E_USER_NOT_FOUND: Self = ErrorCode(-10i32); - pub const E_BAD_PERMISSION: Self = ErrorCode(-11i32); - pub const E_SEMANTIC_ERROR: Self = ErrorCode(-12i32); - pub const E_TOO_MANY_CONNECTIONS: Self = ErrorCode(-13i32); - pub const E_PARTIAL_SUCCEEDED: Self = ErrorCode(-14i32); - } - - impl ::fbthrift::ThriftEnum for ErrorCode { - fn enumerate() -> &'static [(ErrorCode, &'static str)] { - &[ - (ErrorCode::SUCCEEDED, "SUCCEEDED"), - (ErrorCode::E_DISCONNECTED, "E_DISCONNECTED"), - (ErrorCode::E_FAIL_TO_CONNECT, "E_FAIL_TO_CONNECT"), - (ErrorCode::E_RPC_FAILURE, "E_RPC_FAILURE"), - (ErrorCode::E_BAD_USERNAME_PASSWORD, "E_BAD_USERNAME_PASSWORD"), - (ErrorCode::E_SESSION_INVALID, "E_SESSION_INVALID"), - (ErrorCode::E_SESSION_TIMEOUT, "E_SESSION_TIMEOUT"), - (ErrorCode::E_SYNTAX_ERROR, "E_SYNTAX_ERROR"), - (ErrorCode::E_EXECUTION_ERROR, "E_EXECUTION_ERROR"), - (ErrorCode::E_STATEMENT_EMPTY, "E_STATEMENT_EMPTY"), - (ErrorCode::E_USER_NOT_FOUND, "E_USER_NOT_FOUND"), - (ErrorCode::E_BAD_PERMISSION, "E_BAD_PERMISSION"), - (ErrorCode::E_SEMANTIC_ERROR, "E_SEMANTIC_ERROR"), - (ErrorCode::E_TOO_MANY_CONNECTIONS, "E_TOO_MANY_CONNECTIONS"), - (ErrorCode::E_PARTIAL_SUCCEEDED, "E_PARTIAL_SUCCEEDED"), - ] - } - - fn variants() -> &'static [&'static str] { - &[ - "SUCCEEDED", - "E_DISCONNECTED", - "E_FAIL_TO_CONNECT", - "E_RPC_FAILURE", - "E_BAD_USERNAME_PASSWORD", - "E_SESSION_INVALID", - "E_SESSION_TIMEOUT", - "E_SYNTAX_ERROR", - "E_EXECUTION_ERROR", - "E_STATEMENT_EMPTY", - "E_USER_NOT_FOUND", - "E_BAD_PERMISSION", - "E_SEMANTIC_ERROR", - "E_TOO_MANY_CONNECTIONS", - "E_PARTIAL_SUCCEEDED", - ] - } - - fn variant_values() -> &'static [ErrorCode] { - &[ - ErrorCode::SUCCEEDED, - ErrorCode::E_DISCONNECTED, - ErrorCode::E_FAIL_TO_CONNECT, - ErrorCode::E_RPC_FAILURE, - ErrorCode::E_BAD_USERNAME_PASSWORD, - ErrorCode::E_SESSION_INVALID, - ErrorCode::E_SESSION_TIMEOUT, - ErrorCode::E_SYNTAX_ERROR, - ErrorCode::E_EXECUTION_ERROR, - ErrorCode::E_STATEMENT_EMPTY, - ErrorCode::E_USER_NOT_FOUND, - ErrorCode::E_BAD_PERMISSION, - ErrorCode::E_SEMANTIC_ERROR, - ErrorCode::E_TOO_MANY_CONNECTIONS, - ErrorCode::E_PARTIAL_SUCCEEDED, - ] - } - } - - impl ::std::default::Default for ErrorCode { - fn default() -> Self { - ErrorCode(::fbthrift::__UNKNOWN_ID) - } - } - - impl<'a> ::std::convert::From<&'a ErrorCode> for ::std::primitive::i32 { - #[inline] - fn from(x: &'a ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From for ::std::primitive::i32 { - #[inline] - fn from(x: ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From<::std::primitive::i32> for ErrorCode { - #[inline] - fn from(x: ::std::primitive::i32) -> Self { - Self(x) - } - } - - impl ::std::fmt::Display for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - static VARIANTS_BY_NUMBER: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_PARTIAL_SUCCEEDED", -14), - ("E_TOO_MANY_CONNECTIONS", -13), - ("E_SEMANTIC_ERROR", -12), - ("E_BAD_PERMISSION", -11), - ("E_USER_NOT_FOUND", -10), - ("E_STATEMENT_EMPTY", -9), - ("E_EXECUTION_ERROR", -8), - ("E_SYNTAX_ERROR", -7), - ("E_SESSION_TIMEOUT", -6), - ("E_SESSION_INVALID", -5), - ("E_BAD_USERNAME_PASSWORD", -4), - ("E_RPC_FAILURE", -3), - ("E_FAIL_TO_CONNECT", -2), - ("E_DISCONNECTED", -1), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) - } - } - - impl ::std::fmt::Debug for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(fmt, "ErrorCode::{}", self) - } - } - - impl ::std::str::FromStr for ErrorCode { - type Err = ::anyhow::Error; - - fn from_str(string: &::std::primitive::str) -> ::std::result::Result { - static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_BAD_PERMISSION", -11), - ("E_BAD_USERNAME_PASSWORD", -4), - ("E_DISCONNECTED", -1), - ("E_EXECUTION_ERROR", -8), - ("E_FAIL_TO_CONNECT", -2), - ("E_PARTIAL_SUCCEEDED", -14), - ("E_RPC_FAILURE", -3), - ("E_SEMANTIC_ERROR", -12), - ("E_SESSION_INVALID", -5), - ("E_SESSION_TIMEOUT", -6), - ("E_STATEMENT_EMPTY", -9), - ("E_SYNTAX_ERROR", -7), - ("E_TOO_MANY_CONNECTIONS", -13), - ("E_USER_NOT_FOUND", -10), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "ErrorCode").map(ErrorCode) - } - } - - impl ::fbthrift::GetTType for ErrorCode { - const TTYPE: ::fbthrift::TType = ::fbthrift::TType::I32; - } - - impl

::fbthrift::Serialize

for ErrorCode - where - P: ::fbthrift::ProtocolWriter, - { - #[inline] - fn write(&self, p: &mut P) { - p.write_i32(self.into()) - } - } - - impl

::fbthrift::Deserialize

for ErrorCode - where - P: ::fbthrift::ProtocolReader, - { - #[inline] - fn read(p: &mut P) -> ::anyhow::Result { - ::std::result::Result::Ok(ErrorCode::from(p.read_i32()?)) - } + pub time_zone_offset_seconds: ::std::option::Option<::std::primitive::i32>, + pub time_zone_name: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, } impl ::std::default::Default for self::ProfilingStats { @@ -777,6 +591,8 @@ pub mod types { error_code: ::std::default::Default::default(), error_msg: ::std::option::Option::None, session_id: ::std::option::Option::None, + time_zone_offset_seconds: ::std::option::Option::None, + time_zone_name: ::std::option::Option::None, } } } @@ -807,6 +623,16 @@ pub mod types { ::fbthrift::Serialize::write(some, p); p.write_field_end(); } + if let ::std::option::Option::Some(some) = &self.time_zone_offset_seconds { + p.write_field_begin("time_zone_offset_seconds", ::fbthrift::TType::I32, 4); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } + if let ::std::option::Option::Some(some) = &self.time_zone_name { + p.write_field_begin("time_zone_name", ::fbthrift::TType::String, 5); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } p.write_field_stop(); p.write_struct_end(); } @@ -821,10 +647,14 @@ pub mod types { ::fbthrift::Field::new("error_code", ::fbthrift::TType::I32, 1), ::fbthrift::Field::new("error_msg", ::fbthrift::TType::String, 2), ::fbthrift::Field::new("session_id", ::fbthrift::TType::I64, 3), + ::fbthrift::Field::new("time_zone_name", ::fbthrift::TType::String, 5), + ::fbthrift::Field::new("time_zone_offset_seconds", ::fbthrift::TType::I32, 4), ]; let mut field_error_code = ::std::option::Option::None; let mut field_error_msg = ::std::option::Option::None; let mut field_session_id = ::std::option::Option::None; + let mut field_time_zone_offset_seconds = ::std::option::Option::None; + let mut field_time_zone_name = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -833,6 +663,8 @@ pub mod types { (::fbthrift::TType::I32, 1) => field_error_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 2) => field_error_msg = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::I64, 3) => field_session_id = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::I32, 4) => field_time_zone_offset_seconds = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 5) => field_time_zone_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -842,6 +674,8 @@ pub mod types { error_code: field_error_code.unwrap_or_default(), error_msg: field_error_msg, session_id: field_session_id, + time_zone_offset_seconds: field_time_zone_offset_seconds, + time_zone_name: field_time_zone_name, }) } } diff --git a/src/interface/meta/lib.rs b/src/interface/meta/lib.rs index 256d558..3fb0fb2 100644 --- a/src/interface/meta/lib.rs +++ b/src/interface/meta/lib.rs @@ -125,6 +125,7 @@ pub mod types { pub role: crate::types::HostRole, pub git_info_sha: ::std::vec::Vec<::std::primitive::u8>, pub zone_name: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, + pub version: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -146,7 +147,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ExecResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub id: crate::types::ID, pub leader: common::types::HostAddr, } @@ -188,7 +189,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct AdminJobResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub result: crate::types::AdminJobResult, } @@ -228,7 +229,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListSpacesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub spaces: ::std::vec::Vec, } @@ -240,7 +241,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetSpaceResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub item: crate::types::SpaceItem, } @@ -275,7 +276,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListTagsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub tags: ::std::vec::Vec, } @@ -289,7 +290,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetTagResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub schema: crate::types::Schema, } @@ -319,7 +320,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetEdgeResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub schema: crate::types::Schema, } @@ -338,7 +339,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListEdgesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub edges: ::std::vec::Vec, } @@ -350,7 +351,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListHostsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub hosts: ::std::vec::Vec, } @@ -371,7 +372,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListPartsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub parts: ::std::vec::Vec, } @@ -383,9 +384,10 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetPartsAllocResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub parts: ::std::collections::BTreeMap>, + pub terms: ::std::option::Option<::std::collections::BTreeMap>, } #[derive(Clone, Debug, PartialEq)] @@ -402,7 +404,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub value: ::std::vec::Vec<::std::primitive::u8>, } @@ -415,7 +417,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct MultiGetResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub values: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, } @@ -442,14 +444,14 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ScanResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub values: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, } #[derive(Clone, Debug, PartialEq)] pub struct HBResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub cluster_id: crate::types::ClusterID, pub last_update_time_in_ms: ::std::primitive::i64, @@ -468,6 +470,7 @@ pub mod types { pub cluster_id: crate::types::ClusterID, pub leader_partIds: ::std::option::Option<::std::collections::BTreeMap>>, pub git_info_sha: ::std::vec::Vec<::std::primitive::u8>, + pub version: ::std::option::Option<::std::vec::Vec<::std::primitive::u8>>, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -501,7 +504,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetTagIndexResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub item: crate::types::IndexItem, } @@ -513,7 +516,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListTagIndexesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub items: ::std::vec::Vec, } @@ -543,7 +546,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetEdgeIndexResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub item: crate::types::IndexItem, } @@ -555,7 +558,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListEdgeIndexesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub items: ::std::vec::Vec, } @@ -601,7 +604,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListUsersResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub users: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, ::std::vec::Vec<::std::primitive::u8>>, } @@ -613,7 +616,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListRolesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub roles: ::std::vec::Vec, } @@ -647,7 +650,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct BalanceResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub id: ::std::primitive::i64, pub leader: common::types::HostAddr, pub tasks: ::std::vec::Vec, @@ -677,7 +680,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetConfigResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub items: ::std::vec::Vec, } @@ -695,7 +698,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListConfigsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub items: ::std::vec::Vec, } @@ -722,7 +725,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListSnapshotsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub snapshots: ::std::vec::Vec, } @@ -740,7 +743,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListIndexStatusResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub statuses: ::std::vec::Vec, } @@ -775,7 +778,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetZoneResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub hosts: ::std::vec::Vec, } @@ -792,7 +795,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListZonesResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub zones: ::std::vec::Vec, } @@ -827,7 +830,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetGroupResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub zone_names: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, } @@ -844,7 +847,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListGroupsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub groups: ::std::vec::Vec, } @@ -877,7 +880,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListListenerResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub listeners: ::std::vec::Vec, } @@ -889,22 +892,21 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetStatisResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub statis: crate::types::StatisItem, } #[derive(Clone, Debug, PartialEq)] - pub struct CheckpointInfo { + pub struct BackupInfo { pub host: common::types::HostAddr, - pub checkpoint_dir: ::std::vec::Vec<::std::primitive::u8>, + pub info: ::std::vec::Vec, } #[derive(Clone, Debug, PartialEq)] pub struct SpaceBackupInfo { pub space: crate::types::SpaceDesc, - pub partition_info: common::types::PartitionBackupInfo, - pub cp_dirs: ::std::vec::Vec, + pub info: ::std::vec::Vec, } #[derive(Clone, Debug, PartialEq)] @@ -912,6 +914,9 @@ pub mod types { pub backup_info: ::std::collections::BTreeMap, pub meta_files: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, pub backup_name: ::std::vec::Vec<::std::primitive::u8>, + pub full: ::std::primitive::bool, + pub include_system_space: ::std::primitive::bool, + pub create_time: ::std::primitive::i64, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -921,7 +926,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct CreateBackupResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub meta: crate::types::BackupMeta, } @@ -961,11 +966,50 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct ListFTClientsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub clients: ::std::vec::Vec, } + #[derive(Clone, Debug, PartialEq)] + pub struct FTIndex { + pub space_id: common::types::GraphSpaceID, + pub depend_schema: crate::types::SchemaID, + pub fields: ::std::vec::Vec<::std::vec::Vec<::std::primitive::u8>>, + } + + #[derive(Clone, Debug, PartialEq)] + pub struct CreateFTIndexReq { + pub fulltext_index_name: ::std::vec::Vec<::std::primitive::u8>, + pub index: crate::types::FTIndex, + } + + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct DropFTIndexReq { + pub space_id: common::types::GraphSpaceID, + pub fulltext_index_name: ::std::vec::Vec<::std::primitive::u8>, + } + + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct ListFTIndexesReq { + } + + #[derive(Clone, Debug, PartialEq)] + pub struct ListFTIndexesResp { + pub code: common::types::ErrorCode, + pub leader: common::types::HostAddr, + pub indexes: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, crate::types::FTIndex>, + } + + #[derive(Clone, Debug, PartialEq)] + pub struct QueryDesc { + pub start_time: common::types::Timestamp, + pub status: crate::types::QueryStatus, + pub duration: ::std::primitive::i64, + pub query: ::std::vec::Vec<::std::primitive::u8>, + pub graph_addr: common::types::HostAddr, + } + #[derive(Clone, Debug, PartialEq)] pub struct Session { pub session_id: common::types::SessionID, @@ -977,6 +1021,7 @@ pub mod types { pub timezone: ::std::primitive::i32, pub client_ip: ::std::vec::Vec<::std::primitive::u8>, pub configs: ::std::collections::BTreeMap<::std::vec::Vec<::std::primitive::u8>, common::types::Value>, + pub queries: ::std::collections::BTreeMap, } #[derive(Clone, Debug, PartialEq)] @@ -988,7 +1033,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct CreateSessionResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub session: crate::types::Session, } @@ -998,13 +1043,20 @@ pub mod types { pub sessions: ::std::vec::Vec, } + #[derive(Clone, Debug, PartialEq)] + pub struct UpdateSessionsResp { + pub code: common::types::ErrorCode, + pub leader: common::types::HostAddr, + pub killed_queries: ::std::collections::BTreeMap>, + } + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ListSessionsReq { } #[derive(Clone, Debug, PartialEq)] pub struct ListSessionsResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub sessions: ::std::vec::Vec, } @@ -1016,7 +1068,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct GetSessionResp { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub leader: common::types::HostAddr, pub session: crate::types::Session, } @@ -1026,392 +1078,39 @@ pub mod types { pub session_id: common::types::SessionID, } + #[derive(Clone, Debug, PartialEq)] + pub struct KillQueryReq { + pub kill_queries: ::std::collections::BTreeMap>, + } + #[derive(Clone, Debug, PartialEq)] pub struct ReportTaskReq { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub job_id: ::std::primitive::i32, pub task_id: ::std::primitive::i32, pub statis: ::std::option::Option, } - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] - pub struct ErrorCode(pub ::std::primitive::i32); - - impl ErrorCode { - pub const SUCCEEDED: Self = ErrorCode(0i32); - pub const E_DISCONNECTED: Self = ErrorCode(-1i32); - pub const E_FAIL_TO_CONNECT: Self = ErrorCode(-2i32); - pub const E_RPC_FAILURE: Self = ErrorCode(-3i32); - pub const E_LEADER_CHANGED: Self = ErrorCode(-11i32); - pub const E_NO_HOSTS: Self = ErrorCode(-21i32); - pub const E_EXISTED: Self = ErrorCode(-22i32); - pub const E_NOT_FOUND: Self = ErrorCode(-23i32); - pub const E_INVALID_HOST: Self = ErrorCode(-24i32); - pub const E_UNSUPPORTED: Self = ErrorCode(-25i32); - pub const E_NOT_DROP: Self = ErrorCode(-26i32); - pub const E_BALANCER_RUNNING: Self = ErrorCode(-27i32); - pub const E_CONFIG_IMMUTABLE: Self = ErrorCode(-28i32); - pub const E_CONFLICT: Self = ErrorCode(-29i32); - pub const E_INVALID_PARM: Self = ErrorCode(-30i32); - pub const E_WRONGCLUSTER: Self = ErrorCode(-31i32); - pub const E_STORE_FAILURE: Self = ErrorCode(-32i32); - pub const E_STORE_SEGMENT_ILLEGAL: Self = ErrorCode(-33i32); - pub const E_BAD_BALANCE_PLAN: Self = ErrorCode(-34i32); - pub const E_BALANCED: Self = ErrorCode(-35i32); - pub const E_NO_RUNNING_BALANCE_PLAN: Self = ErrorCode(-36i32); - pub const E_NO_VALID_HOST: Self = ErrorCode(-37i32); - pub const E_CORRUPTTED_BALANCE_PLAN: Self = ErrorCode(-38i32); - pub const E_NO_INVALID_BALANCE_PLAN: Self = ErrorCode(-39i32); - pub const E_INVALID_PASSWORD: Self = ErrorCode(-41i32); - pub const E_IMPROPER_ROLE: Self = ErrorCode(-42i32); - pub const E_INVALID_PARTITION_NUM: Self = ErrorCode(-43i32); - pub const E_INVALID_REPLICA_FACTOR: Self = ErrorCode(-44i32); - pub const E_INVALID_CHARSET: Self = ErrorCode(-45i32); - pub const E_INVALID_COLLATE: Self = ErrorCode(-46i32); - pub const E_CHARSET_COLLATE_NOT_MATCH: Self = ErrorCode(-47i32); - pub const E_SNAPSHOT_FAILURE: Self = ErrorCode(-51i32); - pub const E_BLOCK_WRITE_FAILURE: Self = ErrorCode(-52i32); - pub const E_REBUILD_INDEX_FAILURE: Self = ErrorCode(-53i32); - pub const E_INDEX_WITH_TTL: Self = ErrorCode(-54i32); - pub const E_ADD_JOB_FAILURE: Self = ErrorCode(-55i32); - pub const E_STOP_JOB_FAILURE: Self = ErrorCode(-56i32); - pub const E_SAVE_JOB_FAILURE: Self = ErrorCode(-57i32); - pub const E_BALANCER_FAILURE: Self = ErrorCode(-58i32); - pub const E_JOB_NOT_FINISHED: Self = ErrorCode(-59i32); - pub const E_TASK_REPORT_OUT_DATE: Self = ErrorCode(-60i32); - pub const E_INVALID_JOB: Self = ErrorCode(-61i32); - pub const E_BACKUP_FAILURE: Self = ErrorCode(-70i32); - pub const E_BACKUP_BUILDING_INDEX: Self = ErrorCode(-71i32); - pub const E_BACKUP_SPACE_NOT_FOUND: Self = ErrorCode(-72i32); - pub const E_RESTORE_FAILURE: Self = ErrorCode(-80i32); - pub const E_UNKNOWN: Self = ErrorCode(-99i32); - } - - impl ::fbthrift::ThriftEnum for ErrorCode { - fn enumerate() -> &'static [(ErrorCode, &'static str)] { - &[ - (ErrorCode::SUCCEEDED, "SUCCEEDED"), - (ErrorCode::E_DISCONNECTED, "E_DISCONNECTED"), - (ErrorCode::E_FAIL_TO_CONNECT, "E_FAIL_TO_CONNECT"), - (ErrorCode::E_RPC_FAILURE, "E_RPC_FAILURE"), - (ErrorCode::E_LEADER_CHANGED, "E_LEADER_CHANGED"), - (ErrorCode::E_NO_HOSTS, "E_NO_HOSTS"), - (ErrorCode::E_EXISTED, "E_EXISTED"), - (ErrorCode::E_NOT_FOUND, "E_NOT_FOUND"), - (ErrorCode::E_INVALID_HOST, "E_INVALID_HOST"), - (ErrorCode::E_UNSUPPORTED, "E_UNSUPPORTED"), - (ErrorCode::E_NOT_DROP, "E_NOT_DROP"), - (ErrorCode::E_BALANCER_RUNNING, "E_BALANCER_RUNNING"), - (ErrorCode::E_CONFIG_IMMUTABLE, "E_CONFIG_IMMUTABLE"), - (ErrorCode::E_CONFLICT, "E_CONFLICT"), - (ErrorCode::E_INVALID_PARM, "E_INVALID_PARM"), - (ErrorCode::E_WRONGCLUSTER, "E_WRONGCLUSTER"), - (ErrorCode::E_STORE_FAILURE, "E_STORE_FAILURE"), - (ErrorCode::E_STORE_SEGMENT_ILLEGAL, "E_STORE_SEGMENT_ILLEGAL"), - (ErrorCode::E_BAD_BALANCE_PLAN, "E_BAD_BALANCE_PLAN"), - (ErrorCode::E_BALANCED, "E_BALANCED"), - (ErrorCode::E_NO_RUNNING_BALANCE_PLAN, "E_NO_RUNNING_BALANCE_PLAN"), - (ErrorCode::E_NO_VALID_HOST, "E_NO_VALID_HOST"), - (ErrorCode::E_CORRUPTTED_BALANCE_PLAN, "E_CORRUPTTED_BALANCE_PLAN"), - (ErrorCode::E_NO_INVALID_BALANCE_PLAN, "E_NO_INVALID_BALANCE_PLAN"), - (ErrorCode::E_INVALID_PASSWORD, "E_INVALID_PASSWORD"), - (ErrorCode::E_IMPROPER_ROLE, "E_IMPROPER_ROLE"), - (ErrorCode::E_INVALID_PARTITION_NUM, "E_INVALID_PARTITION_NUM"), - (ErrorCode::E_INVALID_REPLICA_FACTOR, "E_INVALID_REPLICA_FACTOR"), - (ErrorCode::E_INVALID_CHARSET, "E_INVALID_CHARSET"), - (ErrorCode::E_INVALID_COLLATE, "E_INVALID_COLLATE"), - (ErrorCode::E_CHARSET_COLLATE_NOT_MATCH, "E_CHARSET_COLLATE_NOT_MATCH"), - (ErrorCode::E_SNAPSHOT_FAILURE, "E_SNAPSHOT_FAILURE"), - (ErrorCode::E_BLOCK_WRITE_FAILURE, "E_BLOCK_WRITE_FAILURE"), - (ErrorCode::E_REBUILD_INDEX_FAILURE, "E_REBUILD_INDEX_FAILURE"), - (ErrorCode::E_INDEX_WITH_TTL, "E_INDEX_WITH_TTL"), - (ErrorCode::E_ADD_JOB_FAILURE, "E_ADD_JOB_FAILURE"), - (ErrorCode::E_STOP_JOB_FAILURE, "E_STOP_JOB_FAILURE"), - (ErrorCode::E_SAVE_JOB_FAILURE, "E_SAVE_JOB_FAILURE"), - (ErrorCode::E_BALANCER_FAILURE, "E_BALANCER_FAILURE"), - (ErrorCode::E_JOB_NOT_FINISHED, "E_JOB_NOT_FINISHED"), - (ErrorCode::E_TASK_REPORT_OUT_DATE, "E_TASK_REPORT_OUT_DATE"), - (ErrorCode::E_INVALID_JOB, "E_INVALID_JOB"), - (ErrorCode::E_BACKUP_FAILURE, "E_BACKUP_FAILURE"), - (ErrorCode::E_BACKUP_BUILDING_INDEX, "E_BACKUP_BUILDING_INDEX"), - (ErrorCode::E_BACKUP_SPACE_NOT_FOUND, "E_BACKUP_SPACE_NOT_FOUND"), - (ErrorCode::E_RESTORE_FAILURE, "E_RESTORE_FAILURE"), - (ErrorCode::E_UNKNOWN, "E_UNKNOWN"), - ] - } - - fn variants() -> &'static [&'static str] { - &[ - "SUCCEEDED", - "E_DISCONNECTED", - "E_FAIL_TO_CONNECT", - "E_RPC_FAILURE", - "E_LEADER_CHANGED", - "E_NO_HOSTS", - "E_EXISTED", - "E_NOT_FOUND", - "E_INVALID_HOST", - "E_UNSUPPORTED", - "E_NOT_DROP", - "E_BALANCER_RUNNING", - "E_CONFIG_IMMUTABLE", - "E_CONFLICT", - "E_INVALID_PARM", - "E_WRONGCLUSTER", - "E_STORE_FAILURE", - "E_STORE_SEGMENT_ILLEGAL", - "E_BAD_BALANCE_PLAN", - "E_BALANCED", - "E_NO_RUNNING_BALANCE_PLAN", - "E_NO_VALID_HOST", - "E_CORRUPTTED_BALANCE_PLAN", - "E_NO_INVALID_BALANCE_PLAN", - "E_INVALID_PASSWORD", - "E_IMPROPER_ROLE", - "E_INVALID_PARTITION_NUM", - "E_INVALID_REPLICA_FACTOR", - "E_INVALID_CHARSET", - "E_INVALID_COLLATE", - "E_CHARSET_COLLATE_NOT_MATCH", - "E_SNAPSHOT_FAILURE", - "E_BLOCK_WRITE_FAILURE", - "E_REBUILD_INDEX_FAILURE", - "E_INDEX_WITH_TTL", - "E_ADD_JOB_FAILURE", - "E_STOP_JOB_FAILURE", - "E_SAVE_JOB_FAILURE", - "E_BALANCER_FAILURE", - "E_JOB_NOT_FINISHED", - "E_TASK_REPORT_OUT_DATE", - "E_INVALID_JOB", - "E_BACKUP_FAILURE", - "E_BACKUP_BUILDING_INDEX", - "E_BACKUP_SPACE_NOT_FOUND", - "E_RESTORE_FAILURE", - "E_UNKNOWN", - ] - } - - fn variant_values() -> &'static [ErrorCode] { - &[ - ErrorCode::SUCCEEDED, - ErrorCode::E_DISCONNECTED, - ErrorCode::E_FAIL_TO_CONNECT, - ErrorCode::E_RPC_FAILURE, - ErrorCode::E_LEADER_CHANGED, - ErrorCode::E_NO_HOSTS, - ErrorCode::E_EXISTED, - ErrorCode::E_NOT_FOUND, - ErrorCode::E_INVALID_HOST, - ErrorCode::E_UNSUPPORTED, - ErrorCode::E_NOT_DROP, - ErrorCode::E_BALANCER_RUNNING, - ErrorCode::E_CONFIG_IMMUTABLE, - ErrorCode::E_CONFLICT, - ErrorCode::E_INVALID_PARM, - ErrorCode::E_WRONGCLUSTER, - ErrorCode::E_STORE_FAILURE, - ErrorCode::E_STORE_SEGMENT_ILLEGAL, - ErrorCode::E_BAD_BALANCE_PLAN, - ErrorCode::E_BALANCED, - ErrorCode::E_NO_RUNNING_BALANCE_PLAN, - ErrorCode::E_NO_VALID_HOST, - ErrorCode::E_CORRUPTTED_BALANCE_PLAN, - ErrorCode::E_NO_INVALID_BALANCE_PLAN, - ErrorCode::E_INVALID_PASSWORD, - ErrorCode::E_IMPROPER_ROLE, - ErrorCode::E_INVALID_PARTITION_NUM, - ErrorCode::E_INVALID_REPLICA_FACTOR, - ErrorCode::E_INVALID_CHARSET, - ErrorCode::E_INVALID_COLLATE, - ErrorCode::E_CHARSET_COLLATE_NOT_MATCH, - ErrorCode::E_SNAPSHOT_FAILURE, - ErrorCode::E_BLOCK_WRITE_FAILURE, - ErrorCode::E_REBUILD_INDEX_FAILURE, - ErrorCode::E_INDEX_WITH_TTL, - ErrorCode::E_ADD_JOB_FAILURE, - ErrorCode::E_STOP_JOB_FAILURE, - ErrorCode::E_SAVE_JOB_FAILURE, - ErrorCode::E_BALANCER_FAILURE, - ErrorCode::E_JOB_NOT_FINISHED, - ErrorCode::E_TASK_REPORT_OUT_DATE, - ErrorCode::E_INVALID_JOB, - ErrorCode::E_BACKUP_FAILURE, - ErrorCode::E_BACKUP_BUILDING_INDEX, - ErrorCode::E_BACKUP_SPACE_NOT_FOUND, - ErrorCode::E_RESTORE_FAILURE, - ErrorCode::E_UNKNOWN, - ] - } - } - - impl ::std::default::Default for ErrorCode { - fn default() -> Self { - ErrorCode(::fbthrift::__UNKNOWN_ID) - } - } - - impl<'a> ::std::convert::From<&'a ErrorCode> for ::std::primitive::i32 { - #[inline] - fn from(x: &'a ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From for ::std::primitive::i32 { - #[inline] - fn from(x: ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From<::std::primitive::i32> for ErrorCode { - #[inline] - fn from(x: ::std::primitive::i32) -> Self { - Self(x) - } - } - - impl ::std::fmt::Display for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - static VARIANTS_BY_NUMBER: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_UNKNOWN", -99), - ("E_RESTORE_FAILURE", -80), - ("E_BACKUP_SPACE_NOT_FOUND", -72), - ("E_BACKUP_BUILDING_INDEX", -71), - ("E_BACKUP_FAILURE", -70), - ("E_INVALID_JOB", -61), - ("E_TASK_REPORT_OUT_DATE", -60), - ("E_JOB_NOT_FINISHED", -59), - ("E_BALANCER_FAILURE", -58), - ("E_SAVE_JOB_FAILURE", -57), - ("E_STOP_JOB_FAILURE", -56), - ("E_ADD_JOB_FAILURE", -55), - ("E_INDEX_WITH_TTL", -54), - ("E_REBUILD_INDEX_FAILURE", -53), - ("E_BLOCK_WRITE_FAILURE", -52), - ("E_SNAPSHOT_FAILURE", -51), - ("E_CHARSET_COLLATE_NOT_MATCH", -47), - ("E_INVALID_COLLATE", -46), - ("E_INVALID_CHARSET", -45), - ("E_INVALID_REPLICA_FACTOR", -44), - ("E_INVALID_PARTITION_NUM", -43), - ("E_IMPROPER_ROLE", -42), - ("E_INVALID_PASSWORD", -41), - ("E_NO_INVALID_BALANCE_PLAN", -39), - ("E_CORRUPTTED_BALANCE_PLAN", -38), - ("E_NO_VALID_HOST", -37), - ("E_NO_RUNNING_BALANCE_PLAN", -36), - ("E_BALANCED", -35), - ("E_BAD_BALANCE_PLAN", -34), - ("E_STORE_SEGMENT_ILLEGAL", -33), - ("E_STORE_FAILURE", -32), - ("E_WRONGCLUSTER", -31), - ("E_INVALID_PARM", -30), - ("E_CONFLICT", -29), - ("E_CONFIG_IMMUTABLE", -28), - ("E_BALANCER_RUNNING", -27), - ("E_NOT_DROP", -26), - ("E_UNSUPPORTED", -25), - ("E_INVALID_HOST", -24), - ("E_NOT_FOUND", -23), - ("E_EXISTED", -22), - ("E_NO_HOSTS", -21), - ("E_LEADER_CHANGED", -11), - ("E_RPC_FAILURE", -3), - ("E_FAIL_TO_CONNECT", -2), - ("E_DISCONNECTED", -1), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) - } - } - - impl ::std::fmt::Debug for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(fmt, "ErrorCode::{}", self) - } - } - - impl ::std::str::FromStr for ErrorCode { - type Err = ::anyhow::Error; - - fn from_str(string: &::std::primitive::str) -> ::std::result::Result { - static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_ADD_JOB_FAILURE", -55), - ("E_BACKUP_BUILDING_INDEX", -71), - ("E_BACKUP_FAILURE", -70), - ("E_BACKUP_SPACE_NOT_FOUND", -72), - ("E_BAD_BALANCE_PLAN", -34), - ("E_BALANCED", -35), - ("E_BALANCER_FAILURE", -58), - ("E_BALANCER_RUNNING", -27), - ("E_BLOCK_WRITE_FAILURE", -52), - ("E_CHARSET_COLLATE_NOT_MATCH", -47), - ("E_CONFIG_IMMUTABLE", -28), - ("E_CONFLICT", -29), - ("E_CORRUPTTED_BALANCE_PLAN", -38), - ("E_DISCONNECTED", -1), - ("E_EXISTED", -22), - ("E_FAIL_TO_CONNECT", -2), - ("E_IMPROPER_ROLE", -42), - ("E_INDEX_WITH_TTL", -54), - ("E_INVALID_CHARSET", -45), - ("E_INVALID_COLLATE", -46), - ("E_INVALID_HOST", -24), - ("E_INVALID_JOB", -61), - ("E_INVALID_PARM", -30), - ("E_INVALID_PARTITION_NUM", -43), - ("E_INVALID_PASSWORD", -41), - ("E_INVALID_REPLICA_FACTOR", -44), - ("E_JOB_NOT_FINISHED", -59), - ("E_LEADER_CHANGED", -11), - ("E_NOT_DROP", -26), - ("E_NOT_FOUND", -23), - ("E_NO_HOSTS", -21), - ("E_NO_INVALID_BALANCE_PLAN", -39), - ("E_NO_RUNNING_BALANCE_PLAN", -36), - ("E_NO_VALID_HOST", -37), - ("E_REBUILD_INDEX_FAILURE", -53), - ("E_RESTORE_FAILURE", -80), - ("E_RPC_FAILURE", -3), - ("E_SAVE_JOB_FAILURE", -57), - ("E_SNAPSHOT_FAILURE", -51), - ("E_STOP_JOB_FAILURE", -56), - ("E_STORE_FAILURE", -32), - ("E_STORE_SEGMENT_ILLEGAL", -33), - ("E_TASK_REPORT_OUT_DATE", -60), - ("E_UNKNOWN", -99), - ("E_UNSUPPORTED", -25), - ("E_WRONGCLUSTER", -31), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "ErrorCode").map(ErrorCode) - } + #[derive(Clone, Debug, PartialEq)] + pub struct ListClusterInfoResp { + pub code: common::types::ErrorCode, + pub leader: common::types::HostAddr, + pub meta_servers: ::std::vec::Vec, + pub storage_servers: ::std::vec::Vec, } - impl ::fbthrift::GetTType for ErrorCode { - const TTYPE: ::fbthrift::TType = ::fbthrift::TType::I32; + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct ListClusterInfoReq { } - impl

::fbthrift::Serialize

for ErrorCode - where - P: ::fbthrift::ProtocolWriter, - { - #[inline] - fn write(&self, p: &mut P) { - p.write_i32(self.into()) - } + #[derive(Clone, Debug, PartialEq)] + pub struct GetMetaDirInfoResp { + pub code: common::types::ErrorCode, + pub dir: common::types::DirInfo, } - impl

::fbthrift::Deserialize

for ErrorCode - where - P: ::fbthrift::ProtocolReader, - { - #[inline] - fn read(p: &mut P) -> ::anyhow::Result { - ::std::result::Result::Ok(ErrorCode::from(p.read_i32()?)) - } + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct GetMetaDirInfoReq { } #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] @@ -2324,10 +2023,11 @@ pub mod types { pub const FLUSH: Self = AdminCmd(1i32); pub const REBUILD_TAG_INDEX: Self = AdminCmd(2i32); pub const REBUILD_EDGE_INDEX: Self = AdminCmd(3i32); - pub const STATS: Self = AdminCmd(4i32); - pub const DATA_BALANCE: Self = AdminCmd(5i32); - pub const DOWELOAD: Self = AdminCmd(6i32); - pub const INGEST: Self = AdminCmd(7i32); + pub const REBUILD_FULLTEXT_INDEX: Self = AdminCmd(4i32); + pub const STATS: Self = AdminCmd(5i32); + pub const DATA_BALANCE: Self = AdminCmd(6i32); + pub const DOWNLOAD: Self = AdminCmd(7i32); + pub const INGEST: Self = AdminCmd(8i32); pub const UNKNOWN: Self = AdminCmd(99i32); } @@ -2338,9 +2038,10 @@ pub mod types { (AdminCmd::FLUSH, "FLUSH"), (AdminCmd::REBUILD_TAG_INDEX, "REBUILD_TAG_INDEX"), (AdminCmd::REBUILD_EDGE_INDEX, "REBUILD_EDGE_INDEX"), + (AdminCmd::REBUILD_FULLTEXT_INDEX, "REBUILD_FULLTEXT_INDEX"), (AdminCmd::STATS, "STATS"), (AdminCmd::DATA_BALANCE, "DATA_BALANCE"), - (AdminCmd::DOWELOAD, "DOWELOAD"), + (AdminCmd::DOWNLOAD, "DOWNLOAD"), (AdminCmd::INGEST, "INGEST"), (AdminCmd::UNKNOWN, "UNKNOWN"), ] @@ -2352,9 +2053,10 @@ pub mod types { "FLUSH", "REBUILD_TAG_INDEX", "REBUILD_EDGE_INDEX", + "REBUILD_FULLTEXT_INDEX", "STATS", "DATA_BALANCE", - "DOWELOAD", + "DOWNLOAD", "INGEST", "UNKNOWN", ] @@ -2366,9 +2068,10 @@ pub mod types { AdminCmd::FLUSH, AdminCmd::REBUILD_TAG_INDEX, AdminCmd::REBUILD_EDGE_INDEX, + AdminCmd::REBUILD_FULLTEXT_INDEX, AdminCmd::STATS, AdminCmd::DATA_BALANCE, - AdminCmd::DOWELOAD, + AdminCmd::DOWNLOAD, AdminCmd::INGEST, AdminCmd::UNKNOWN, ] @@ -2409,10 +2112,11 @@ pub mod types { ("FLUSH", 1), ("REBUILD_TAG_INDEX", 2), ("REBUILD_EDGE_INDEX", 3), - ("STATS", 4), - ("DATA_BALANCE", 5), - ("DOWELOAD", 6), - ("INGEST", 7), + ("REBUILD_FULLTEXT_INDEX", 4), + ("STATS", 5), + ("DATA_BALANCE", 6), + ("DOWNLOAD", 7), + ("INGEST", 8), ("UNKNOWN", 99), ]; ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) @@ -2431,13 +2135,14 @@ pub mod types { fn from_str(string: &::std::primitive::str) -> ::std::result::Result { static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ ("COMPACT", 0), - ("DATA_BALANCE", 5), - ("DOWELOAD", 6), + ("DATA_BALANCE", 6), + ("DOWNLOAD", 7), ("FLUSH", 1), - ("INGEST", 7), + ("INGEST", 8), ("REBUILD_EDGE_INDEX", 3), + ("REBUILD_FULLTEXT_INDEX", 4), ("REBUILD_TAG_INDEX", 2), - ("STATS", 4), + ("STATS", 5), ("UNKNOWN", 99), ]; ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "AdminCmd").map(AdminCmd) @@ -3438,6 +3143,116 @@ pub mod types { } } + #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] + pub struct QueryStatus(pub ::std::primitive::i32); + + impl QueryStatus { + pub const RUNNING: Self = QueryStatus(1i32); + pub const KILLING: Self = QueryStatus(2i32); + } + + impl ::fbthrift::ThriftEnum for QueryStatus { + fn enumerate() -> &'static [(QueryStatus, &'static str)] { + &[ + (QueryStatus::RUNNING, "RUNNING"), + (QueryStatus::KILLING, "KILLING"), + ] + } + + fn variants() -> &'static [&'static str] { + &[ + "RUNNING", + "KILLING", + ] + } + + fn variant_values() -> &'static [QueryStatus] { + &[ + QueryStatus::RUNNING, + QueryStatus::KILLING, + ] + } + } + + impl ::std::default::Default for QueryStatus { + fn default() -> Self { + QueryStatus(::fbthrift::__UNKNOWN_ID) + } + } + + impl<'a> ::std::convert::From<&'a QueryStatus> for ::std::primitive::i32 { + #[inline] + fn from(x: &'a QueryStatus) -> Self { + x.0 + } + } + + impl ::std::convert::From for ::std::primitive::i32 { + #[inline] + fn from(x: QueryStatus) -> Self { + x.0 + } + } + + impl ::std::convert::From<::std::primitive::i32> for QueryStatus { + #[inline] + fn from(x: ::std::primitive::i32) -> Self { + Self(x) + } + } + + impl ::std::fmt::Display for QueryStatus { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + static VARIANTS_BY_NUMBER: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ + ("RUNNING", 1), + ("KILLING", 2), + ]; + ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) + } + } + + impl ::std::fmt::Debug for QueryStatus { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(fmt, "QueryStatus::{}", self) + } + } + + impl ::std::str::FromStr for QueryStatus { + type Err = ::anyhow::Error; + + fn from_str(string: &::std::primitive::str) -> ::std::result::Result { + static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ + ("KILLING", 2), + ("RUNNING", 1), + ]; + ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "QueryStatus").map(QueryStatus) + } + } + + impl ::fbthrift::GetTType for QueryStatus { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::I32; + } + + impl

::fbthrift::Serialize

for QueryStatus + where + P: ::fbthrift::ProtocolWriter, + { + #[inline] + fn write(&self, p: &mut P) { + p.write_i32(self.into()) + } + } + + impl

::fbthrift::Deserialize

for QueryStatus + where + P: ::fbthrift::ProtocolReader, + { + #[inline] + fn read(p: &mut P) -> ::anyhow::Result { + ::std::result::Result::Ok(QueryStatus::from(p.read_i32()?)) + } + } + @@ -4526,6 +4341,7 @@ pub mod types { role: ::std::default::Default::default(), git_info_sha: ::std::default::Default::default(), zone_name: ::std::option::Option::None, + version: ::std::option::Option::None, } } } @@ -4566,6 +4382,11 @@ pub mod types { ::fbthrift::Serialize::write(some, p); p.write_field_end(); } + if let ::std::option::Option::Some(some) = &self.version { + p.write_field_begin("version", ::fbthrift::TType::String, 8); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } p.write_field_stop(); p.write_struct_end(); } @@ -4583,6 +4404,7 @@ pub mod types { ::fbthrift::Field::new("leader_parts", ::fbthrift::TType::Map, 3), ::fbthrift::Field::new("role", ::fbthrift::TType::I32, 5), ::fbthrift::Field::new("status", ::fbthrift::TType::I32, 2), + ::fbthrift::Field::new("version", ::fbthrift::TType::String, 8), ::fbthrift::Field::new("zone_name", ::fbthrift::TType::String, 7), ]; let mut field_hostAddr = ::std::option::Option::None; @@ -4592,6 +4414,7 @@ pub mod types { let mut field_role = ::std::option::Option::None; let mut field_git_info_sha = ::std::option::Option::None; let mut field_zone_name = ::std::option::Option::None; + let mut field_version = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -4604,6 +4427,7 @@ pub mod types { (::fbthrift::TType::I32, 5) => field_role = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 6) => field_git_info_sha = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 7) => field_zone_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 8) => field_version = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -4617,6 +4441,7 @@ pub mod types { role: field_role.unwrap_or_default(), git_info_sha: field_git_info_sha.unwrap_or_default(), zone_name: field_zone_name, + version: field_version, }) } } @@ -7246,6 +7071,7 @@ pub mod types { code: ::std::default::Default::default(), leader: ::std::default::Default::default(), parts: ::std::default::Default::default(), + terms: ::std::option::Option::None, } } } @@ -7272,6 +7098,11 @@ pub mod types { p.write_field_begin("parts", ::fbthrift::TType::Map, 3); ::fbthrift::Serialize::write(&self.parts, p); p.write_field_end(); + if let ::std::option::Option::Some(some) = &self.terms { + p.write_field_begin("terms", ::fbthrift::TType::Map, 4); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } p.write_field_stop(); p.write_struct_end(); } @@ -7286,10 +7117,12 @@ pub mod types { ::fbthrift::Field::new("code", ::fbthrift::TType::I32, 1), ::fbthrift::Field::new("leader", ::fbthrift::TType::Struct, 2), ::fbthrift::Field::new("parts", ::fbthrift::TType::Map, 3), + ::fbthrift::Field::new("terms", ::fbthrift::TType::Map, 4), ]; let mut field_code = ::std::option::Option::None; let mut field_leader = ::std::option::Option::None; let mut field_parts = ::std::option::Option::None; + let mut field_terms = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -7298,6 +7131,7 @@ pub mod types { (::fbthrift::TType::I32, 1) => field_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Struct, 2) => field_leader = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Map, 3) => field_parts = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Map, 4) => field_terms = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -7307,6 +7141,7 @@ pub mod types { code: field_code.unwrap_or_default(), leader: field_leader.unwrap_or_default(), parts: field_parts.unwrap_or_default(), + terms: field_terms, }) } } @@ -8080,6 +7915,7 @@ pub mod types { cluster_id: ::std::default::Default::default(), leader_partIds: ::std::option::Option::None, git_info_sha: ::std::default::Default::default(), + version: ::std::option::Option::None, } } } @@ -8114,6 +7950,11 @@ pub mod types { p.write_field_begin("git_info_sha", ::fbthrift::TType::String, 5); ::fbthrift::Serialize::write(&self.git_info_sha, p); p.write_field_end(); + if let ::std::option::Option::Some(some) = &self.version { + p.write_field_begin("version", ::fbthrift::TType::String, 6); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } p.write_field_stop(); p.write_struct_end(); } @@ -8130,12 +7971,14 @@ pub mod types { ::fbthrift::Field::new("host", ::fbthrift::TType::Struct, 2), ::fbthrift::Field::new("leader_partIds", ::fbthrift::TType::Map, 4), ::fbthrift::Field::new("role", ::fbthrift::TType::I32, 1), + ::fbthrift::Field::new("version", ::fbthrift::TType::String, 6), ]; let mut field_role = ::std::option::Option::None; let mut field_host = ::std::option::Option::None; let mut field_cluster_id = ::std::option::Option::None; let mut field_leader_partIds = ::std::option::Option::None; let mut field_git_info_sha = ::std::option::Option::None; + let mut field_version = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -8146,6 +7989,7 @@ pub mod types { (::fbthrift::TType::I64, 3) => field_cluster_id = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Map, 4) => field_leader_partIds = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 5) => field_git_info_sha = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 6) => field_version = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -8157,6 +8001,7 @@ pub mod types { cluster_id: field_cluster_id.unwrap_or_default(), leader_partIds: field_leader_partIds, git_info_sha: field_git_info_sha.unwrap_or_default(), + version: field_version, }) } } @@ -12674,57 +12519,57 @@ pub mod types { } - impl ::std::default::Default for self::CheckpointInfo { + impl ::std::default::Default for self::BackupInfo { fn default() -> Self { Self { host: ::std::default::Default::default(), - checkpoint_dir: ::std::default::Default::default(), + info: ::std::default::Default::default(), } } } - unsafe impl ::std::marker::Send for self::CheckpointInfo {} - unsafe impl ::std::marker::Sync for self::CheckpointInfo {} + unsafe impl ::std::marker::Send for self::BackupInfo {} + unsafe impl ::std::marker::Sync for self::BackupInfo {} - impl ::fbthrift::GetTType for self::CheckpointInfo { + impl ::fbthrift::GetTType for self::BackupInfo { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } - impl

::fbthrift::Serialize

for self::CheckpointInfo + impl

::fbthrift::Serialize

for self::BackupInfo where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { - p.write_struct_begin("CheckpointInfo"); + p.write_struct_begin("BackupInfo"); p.write_field_begin("host", ::fbthrift::TType::Struct, 1); ::fbthrift::Serialize::write(&self.host, p); p.write_field_end(); - p.write_field_begin("checkpoint_dir", ::fbthrift::TType::String, 2); - ::fbthrift::Serialize::write(&self.checkpoint_dir, p); + p.write_field_begin("info", ::fbthrift::TType::List, 2); + ::fbthrift::Serialize::write(&self.info, p); p.write_field_end(); p.write_field_stop(); p.write_struct_end(); } } - impl

::fbthrift::Deserialize

for self::CheckpointInfo + impl

::fbthrift::Deserialize

for self::BackupInfo where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("checkpoint_dir", ::fbthrift::TType::String, 2), ::fbthrift::Field::new("host", ::fbthrift::TType::Struct, 1), + ::fbthrift::Field::new("info", ::fbthrift::TType::List, 2), ]; let mut field_host = ::std::option::Option::None; - let mut field_checkpoint_dir = ::std::option::Option::None; + let mut field_info = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::Struct, 1) => field_host = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::String, 2) => field_checkpoint_dir = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 2) => field_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -12732,7 +12577,7 @@ pub mod types { p.read_struct_end()?; ::std::result::Result::Ok(Self { host: field_host.unwrap_or_default(), - checkpoint_dir: field_checkpoint_dir.unwrap_or_default(), + info: field_info.unwrap_or_default(), }) } } @@ -12742,8 +12587,7 @@ pub mod types { fn default() -> Self { Self { space: ::std::default::Default::default(), - partition_info: ::std::default::Default::default(), - cp_dirs: ::std::default::Default::default(), + info: ::std::default::Default::default(), } } } @@ -12764,11 +12608,8 @@ pub mod types { p.write_field_begin("space", ::fbthrift::TType::Struct, 1); ::fbthrift::Serialize::write(&self.space, p); p.write_field_end(); - p.write_field_begin("partition_info", ::fbthrift::TType::Struct, 2); - ::fbthrift::Serialize::write(&self.partition_info, p); - p.write_field_end(); - p.write_field_begin("cp_dirs", ::fbthrift::TType::List, 3); - ::fbthrift::Serialize::write(&self.cp_dirs, p); + p.write_field_begin("info", ::fbthrift::TType::List, 2); + ::fbthrift::Serialize::write(&self.info, p); p.write_field_end(); p.write_field_stop(); p.write_struct_end(); @@ -12781,21 +12622,18 @@ pub mod types { { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("cp_dirs", ::fbthrift::TType::List, 3), - ::fbthrift::Field::new("partition_info", ::fbthrift::TType::Struct, 2), + ::fbthrift::Field::new("info", ::fbthrift::TType::List, 2), ::fbthrift::Field::new("space", ::fbthrift::TType::Struct, 1), ]; let mut field_space = ::std::option::Option::None; - let mut field_partition_info = ::std::option::Option::None; - let mut field_cp_dirs = ::std::option::Option::None; + let mut field_info = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::Struct, 1) => field_space = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, 2) => field_partition_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::List, 3) => field_cp_dirs = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 2) => field_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -12803,8 +12641,7 @@ pub mod types { p.read_struct_end()?; ::std::result::Result::Ok(Self { space: field_space.unwrap_or_default(), - partition_info: field_partition_info.unwrap_or_default(), - cp_dirs: field_cp_dirs.unwrap_or_default(), + info: field_info.unwrap_or_default(), }) } } @@ -12816,6 +12653,9 @@ pub mod types { backup_info: ::std::default::Default::default(), meta_files: ::std::default::Default::default(), backup_name: ::std::default::Default::default(), + full: ::std::default::Default::default(), + include_system_space: ::std::default::Default::default(), + create_time: ::std::default::Default::default(), } } } @@ -12842,6 +12682,15 @@ pub mod types { p.write_field_begin("backup_name", ::fbthrift::TType::String, 3); ::fbthrift::Serialize::write(&self.backup_name, p); p.write_field_end(); + p.write_field_begin("full", ::fbthrift::TType::Bool, 4); + ::fbthrift::Serialize::write(&self.full, p); + p.write_field_end(); + p.write_field_begin("include_system_space", ::fbthrift::TType::Bool, 5); + ::fbthrift::Serialize::write(&self.include_system_space, p); + p.write_field_end(); + p.write_field_begin("create_time", ::fbthrift::TType::I64, 6); + ::fbthrift::Serialize::write(&self.create_time, p); + p.write_field_end(); p.write_field_stop(); p.write_struct_end(); } @@ -12855,11 +12704,17 @@ pub mod types { static FIELDS: &[::fbthrift::Field] = &[ ::fbthrift::Field::new("backup_info", ::fbthrift::TType::Map, 1), ::fbthrift::Field::new("backup_name", ::fbthrift::TType::String, 3), + ::fbthrift::Field::new("create_time", ::fbthrift::TType::I64, 6), + ::fbthrift::Field::new("full", ::fbthrift::TType::Bool, 4), + ::fbthrift::Field::new("include_system_space", ::fbthrift::TType::Bool, 5), ::fbthrift::Field::new("meta_files", ::fbthrift::TType::List, 2), ]; let mut field_backup_info = ::std::option::Option::None; let mut field_meta_files = ::std::option::Option::None; let mut field_backup_name = ::std::option::Option::None; + let mut field_full = ::std::option::Option::None; + let mut field_include_system_space = ::std::option::Option::None; + let mut field_create_time = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -12868,6 +12723,9 @@ pub mod types { (::fbthrift::TType::Map, 1) => field_backup_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::List, 2) => field_meta_files = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 3) => field_backup_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Bool, 4) => field_full = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Bool, 5) => field_include_system_space = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::I64, 6) => field_create_time = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -12877,6 +12735,9 @@ pub mod types { backup_info: field_backup_info.unwrap_or_default(), meta_files: field_meta_files.unwrap_or_default(), backup_name: field_backup_name.unwrap_or_default(), + full: field_full.unwrap_or_default(), + include_system_space: field_include_system_space.unwrap_or_default(), + create_time: field_create_time.unwrap_or_default(), }) } } @@ -13448,6 +13309,414 @@ pub mod types { } + impl ::std::default::Default for self::FTIndex { + fn default() -> Self { + Self { + space_id: ::std::default::Default::default(), + depend_schema: ::std::default::Default::default(), + fields: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::FTIndex {} + unsafe impl ::std::marker::Sync for self::FTIndex {} + + impl ::fbthrift::GetTType for self::FTIndex { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::FTIndex + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("FTIndex"); + p.write_field_begin("space_id", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.space_id, p); + p.write_field_end(); + p.write_field_begin("depend_schema", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.depend_schema, p); + p.write_field_end(); + p.write_field_begin("fields", ::fbthrift::TType::List, 3); + ::fbthrift::Serialize::write(&self.fields, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::FTIndex + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("depend_schema", ::fbthrift::TType::Struct, 2), + ::fbthrift::Field::new("fields", ::fbthrift::TType::List, 3), + ::fbthrift::Field::new("space_id", ::fbthrift::TType::I32, 1), + ]; + let mut field_space_id = ::std::option::Option::None; + let mut field_depend_schema = ::std::option::Option::None; + let mut field_fields = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_space_id = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_depend_schema = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 3) => field_fields = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + space_id: field_space_id.unwrap_or_default(), + depend_schema: field_depend_schema.unwrap_or_default(), + fields: field_fields.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::CreateFTIndexReq { + fn default() -> Self { + Self { + fulltext_index_name: ::std::default::Default::default(), + index: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::CreateFTIndexReq {} + unsafe impl ::std::marker::Sync for self::CreateFTIndexReq {} + + impl ::fbthrift::GetTType for self::CreateFTIndexReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::CreateFTIndexReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("CreateFTIndexReq"); + p.write_field_begin("fulltext_index_name", ::fbthrift::TType::String, 1); + ::fbthrift::Serialize::write(&self.fulltext_index_name, p); + p.write_field_end(); + p.write_field_begin("index", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.index, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::CreateFTIndexReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("fulltext_index_name", ::fbthrift::TType::String, 1), + ::fbthrift::Field::new("index", ::fbthrift::TType::Struct, 2), + ]; + let mut field_fulltext_index_name = ::std::option::Option::None; + let mut field_index = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::String, 1) => field_fulltext_index_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_index = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + fulltext_index_name: field_fulltext_index_name.unwrap_or_default(), + index: field_index.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::DropFTIndexReq { + fn default() -> Self { + Self { + space_id: ::std::default::Default::default(), + fulltext_index_name: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::DropFTIndexReq {} + unsafe impl ::std::marker::Sync for self::DropFTIndexReq {} + + impl ::fbthrift::GetTType for self::DropFTIndexReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::DropFTIndexReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("DropFTIndexReq"); + p.write_field_begin("space_id", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.space_id, p); + p.write_field_end(); + p.write_field_begin("fulltext_index_name", ::fbthrift::TType::String, 2); + ::fbthrift::Serialize::write(&self.fulltext_index_name, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::DropFTIndexReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("fulltext_index_name", ::fbthrift::TType::String, 2), + ::fbthrift::Field::new("space_id", ::fbthrift::TType::I32, 1), + ]; + let mut field_space_id = ::std::option::Option::None; + let mut field_fulltext_index_name = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_space_id = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 2) => field_fulltext_index_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + space_id: field_space_id.unwrap_or_default(), + fulltext_index_name: field_fulltext_index_name.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::ListFTIndexesReq { + fn default() -> Self { + Self { + } + } + } + + unsafe impl ::std::marker::Send for self::ListFTIndexesReq {} + unsafe impl ::std::marker::Sync for self::ListFTIndexesReq {} + + impl ::fbthrift::GetTType for self::ListFTIndexesReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::ListFTIndexesReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListFTIndexesReq"); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::ListFTIndexesReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ]; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + }) + } + } + + + impl ::std::default::Default for self::ListFTIndexesResp { + fn default() -> Self { + Self { + code: ::std::default::Default::default(), + leader: ::std::default::Default::default(), + indexes: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::ListFTIndexesResp {} + unsafe impl ::std::marker::Sync for self::ListFTIndexesResp {} + + impl ::fbthrift::GetTType for self::ListFTIndexesResp { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::ListFTIndexesResp + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListFTIndexesResp"); + p.write_field_begin("code", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.code, p); + p.write_field_end(); + p.write_field_begin("leader", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.leader, p); + p.write_field_end(); + p.write_field_begin("indexes", ::fbthrift::TType::Map, 3); + ::fbthrift::Serialize::write(&self.indexes, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::ListFTIndexesResp + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("code", ::fbthrift::TType::I32, 1), + ::fbthrift::Field::new("indexes", ::fbthrift::TType::Map, 3), + ::fbthrift::Field::new("leader", ::fbthrift::TType::Struct, 2), + ]; + let mut field_code = ::std::option::Option::None; + let mut field_leader = ::std::option::Option::None; + let mut field_indexes = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_leader = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Map, 3) => field_indexes = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + code: field_code.unwrap_or_default(), + leader: field_leader.unwrap_or_default(), + indexes: field_indexes.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::QueryDesc { + fn default() -> Self { + Self { + start_time: ::std::default::Default::default(), + status: ::std::default::Default::default(), + duration: ::std::default::Default::default(), + query: ::std::default::Default::default(), + graph_addr: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::QueryDesc {} + unsafe impl ::std::marker::Sync for self::QueryDesc {} + + impl ::fbthrift::GetTType for self::QueryDesc { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::QueryDesc + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("QueryDesc"); + p.write_field_begin("start_time", ::fbthrift::TType::I64, 1); + ::fbthrift::Serialize::write(&self.start_time, p); + p.write_field_end(); + p.write_field_begin("status", ::fbthrift::TType::I32, 2); + ::fbthrift::Serialize::write(&self.status, p); + p.write_field_end(); + p.write_field_begin("duration", ::fbthrift::TType::I64, 3); + ::fbthrift::Serialize::write(&self.duration, p); + p.write_field_end(); + p.write_field_begin("query", ::fbthrift::TType::String, 4); + ::fbthrift::Serialize::write(&self.query, p); + p.write_field_end(); + p.write_field_begin("graph_addr", ::fbthrift::TType::Struct, 5); + ::fbthrift::Serialize::write(&self.graph_addr, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::QueryDesc + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("duration", ::fbthrift::TType::I64, 3), + ::fbthrift::Field::new("graph_addr", ::fbthrift::TType::Struct, 5), + ::fbthrift::Field::new("query", ::fbthrift::TType::String, 4), + ::fbthrift::Field::new("start_time", ::fbthrift::TType::I64, 1), + ::fbthrift::Field::new("status", ::fbthrift::TType::I32, 2), + ]; + let mut field_start_time = ::std::option::Option::None; + let mut field_status = ::std::option::Option::None; + let mut field_duration = ::std::option::Option::None; + let mut field_query = ::std::option::Option::None; + let mut field_graph_addr = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I64, 1) => field_start_time = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::I32, 2) => field_status = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::I64, 3) => field_duration = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::String, 4) => field_query = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 5) => field_graph_addr = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + start_time: field_start_time.unwrap_or_default(), + status: field_status.unwrap_or_default(), + duration: field_duration.unwrap_or_default(), + query: field_query.unwrap_or_default(), + graph_addr: field_graph_addr.unwrap_or_default(), + }) + } + } + + impl ::std::default::Default for self::Session { fn default() -> Self { Self { @@ -13460,6 +13729,7 @@ pub mod types { timezone: ::std::default::Default::default(), client_ip: ::std::default::Default::default(), configs: ::std::default::Default::default(), + queries: ::std::default::Default::default(), } } } @@ -13504,6 +13774,9 @@ pub mod types { p.write_field_begin("configs", ::fbthrift::TType::Map, 9); ::fbthrift::Serialize::write(&self.configs, p); p.write_field_end(); + p.write_field_begin("queries", ::fbthrift::TType::Map, 10); + ::fbthrift::Serialize::write(&self.queries, p); + p.write_field_end(); p.write_field_stop(); p.write_struct_end(); } @@ -13519,6 +13792,7 @@ pub mod types { ::fbthrift::Field::new("configs", ::fbthrift::TType::Map, 9), ::fbthrift::Field::new("create_time", ::fbthrift::TType::I64, 2), ::fbthrift::Field::new("graph_addr", ::fbthrift::TType::Struct, 6), + ::fbthrift::Field::new("queries", ::fbthrift::TType::Map, 10), ::fbthrift::Field::new("session_id", ::fbthrift::TType::I64, 1), ::fbthrift::Field::new("space_name", ::fbthrift::TType::String, 5), ::fbthrift::Field::new("timezone", ::fbthrift::TType::I32, 7), @@ -13534,6 +13808,7 @@ pub mod types { let mut field_timezone = ::std::option::Option::None; let mut field_client_ip = ::std::option::Option::None; let mut field_configs = ::std::option::Option::None; + let mut field_queries = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; @@ -13548,6 +13823,7 @@ pub mod types { (::fbthrift::TType::I32, 7) => field_timezone = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::String, 8) => field_client_ip = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Map, 9) => field_configs = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Map, 10) => field_queries = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -13563,6 +13839,7 @@ pub mod types { timezone: field_timezone.unwrap_or_default(), client_ip: field_client_ip.unwrap_or_default(), configs: field_configs.unwrap_or_default(), + queries: field_queries.unwrap_or_default(), }) } } @@ -13768,6 +14045,78 @@ pub mod types { } + impl ::std::default::Default for self::UpdateSessionsResp { + fn default() -> Self { + Self { + code: ::std::default::Default::default(), + leader: ::std::default::Default::default(), + killed_queries: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::UpdateSessionsResp {} + unsafe impl ::std::marker::Sync for self::UpdateSessionsResp {} + + impl ::fbthrift::GetTType for self::UpdateSessionsResp { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::UpdateSessionsResp + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("UpdateSessionsResp"); + p.write_field_begin("code", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.code, p); + p.write_field_end(); + p.write_field_begin("leader", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.leader, p); + p.write_field_end(); + p.write_field_begin("killed_queries", ::fbthrift::TType::Map, 3); + ::fbthrift::Serialize::write(&self.killed_queries, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::UpdateSessionsResp + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("code", ::fbthrift::TType::I32, 1), + ::fbthrift::Field::new("killed_queries", ::fbthrift::TType::Map, 3), + ::fbthrift::Field::new("leader", ::fbthrift::TType::Struct, 2), + ]; + let mut field_code = ::std::option::Option::None; + let mut field_leader = ::std::option::Option::None; + let mut field_killed_queries = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_leader = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Map, 3) => field_killed_queries = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + code: field_code.unwrap_or_default(), + leader: field_leader.unwrap_or_default(), + killed_queries: field_killed_queries.unwrap_or_default(), + }) + } + } + + impl ::std::default::Default for self::ListSessionsReq { fn default() -> Self { Self { @@ -14072,6 +14421,62 @@ pub mod types { } + impl ::std::default::Default for self::KillQueryReq { + fn default() -> Self { + Self { + kill_queries: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::KillQueryReq {} + unsafe impl ::std::marker::Sync for self::KillQueryReq {} + + impl ::fbthrift::GetTType for self::KillQueryReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::KillQueryReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("KillQueryReq"); + p.write_field_begin("kill_queries", ::fbthrift::TType::Map, 1); + ::fbthrift::Serialize::write(&self.kill_queries, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::KillQueryReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("kill_queries", ::fbthrift::TType::Map, 1), + ]; + let mut field_kill_queries = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Map, 1) => field_kill_queries = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + kill_queries: field_kill_queries.unwrap_or_default(), + }) + } + } + + impl ::std::default::Default for self::ReportTaskReq { fn default() -> Self { Self { @@ -14153,6 +14558,246 @@ pub mod types { } } + + impl ::std::default::Default for self::ListClusterInfoResp { + fn default() -> Self { + Self { + code: ::std::default::Default::default(), + leader: ::std::default::Default::default(), + meta_servers: ::std::default::Default::default(), + storage_servers: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::ListClusterInfoResp {} + unsafe impl ::std::marker::Sync for self::ListClusterInfoResp {} + + impl ::fbthrift::GetTType for self::ListClusterInfoResp { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::ListClusterInfoResp + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListClusterInfoResp"); + p.write_field_begin("code", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.code, p); + p.write_field_end(); + p.write_field_begin("leader", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.leader, p); + p.write_field_end(); + p.write_field_begin("meta_servers", ::fbthrift::TType::List, 3); + ::fbthrift::Serialize::write(&self.meta_servers, p); + p.write_field_end(); + p.write_field_begin("storage_servers", ::fbthrift::TType::List, 4); + ::fbthrift::Serialize::write(&self.storage_servers, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::ListClusterInfoResp + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("code", ::fbthrift::TType::I32, 1), + ::fbthrift::Field::new("leader", ::fbthrift::TType::Struct, 2), + ::fbthrift::Field::new("meta_servers", ::fbthrift::TType::List, 3), + ::fbthrift::Field::new("storage_servers", ::fbthrift::TType::List, 4), + ]; + let mut field_code = ::std::option::Option::None; + let mut field_leader = ::std::option::Option::None; + let mut field_meta_servers = ::std::option::Option::None; + let mut field_storage_servers = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_leader = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 3) => field_meta_servers = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 4) => field_storage_servers = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + code: field_code.unwrap_or_default(), + leader: field_leader.unwrap_or_default(), + meta_servers: field_meta_servers.unwrap_or_default(), + storage_servers: field_storage_servers.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::ListClusterInfoReq { + fn default() -> Self { + Self { + } + } + } + + unsafe impl ::std::marker::Send for self::ListClusterInfoReq {} + unsafe impl ::std::marker::Sync for self::ListClusterInfoReq {} + + impl ::fbthrift::GetTType for self::ListClusterInfoReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::ListClusterInfoReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListClusterInfoReq"); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::ListClusterInfoReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ]; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + }) + } + } + + + impl ::std::default::Default for self::GetMetaDirInfoResp { + fn default() -> Self { + Self { + code: ::std::default::Default::default(), + dir: ::std::default::Default::default(), + } + } + } + + unsafe impl ::std::marker::Send for self::GetMetaDirInfoResp {} + unsafe impl ::std::marker::Sync for self::GetMetaDirInfoResp {} + + impl ::fbthrift::GetTType for self::GetMetaDirInfoResp { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::GetMetaDirInfoResp + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("GetMetaDirInfoResp"); + p.write_field_begin("code", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(&self.code, p); + p.write_field_end(); + p.write_field_begin("dir", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.dir, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::GetMetaDirInfoResp + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("code", ::fbthrift::TType::I32, 1), + ::fbthrift::Field::new("dir", ::fbthrift::TType::Struct, 2), + ]; + let mut field_code = ::std::option::Option::None; + let mut field_dir = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::I32, 1) => field_code = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_dir = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + code: field_code.unwrap_or_default(), + dir: field_dir.unwrap_or_default(), + }) + } + } + + + impl ::std::default::Default for self::GetMetaDirInfoReq { + fn default() -> Self { + Self { + } + } + } + + unsafe impl ::std::marker::Send for self::GetMetaDirInfoReq {} + unsafe impl ::std::marker::Sync for self::GetMetaDirInfoReq {} + + impl ::fbthrift::GetTType for self::GetMetaDirInfoReq { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for self::GetMetaDirInfoReq + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("GetMetaDirInfoReq"); + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for self::GetMetaDirInfoReq + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ]; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + }) + } + } + } pub mod dependencies { @@ -21078,6 +21723,279 @@ pub mod services { } } + #[derive(Clone, Debug)] + pub enum CreateFTIndexExn { + Success(crate::types::ExecResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for CreateFTIndexExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + CreateFTIndexExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for CreateFTIndexExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for CreateFTIndexExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("CreateFTIndex"); + match self { + CreateFTIndexExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + CreateFTIndexExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for CreateFTIndexExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(CreateFTIndexExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "CreateFTIndexExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "CreateFTIndexExn"), + ) + .into(), + ) + } + } + + #[derive(Clone, Debug)] + pub enum DropFTIndexExn { + Success(crate::types::ExecResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for DropFTIndexExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + DropFTIndexExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for DropFTIndexExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for DropFTIndexExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("DropFTIndex"); + match self { + DropFTIndexExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + DropFTIndexExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for DropFTIndexExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(DropFTIndexExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "DropFTIndexExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "DropFTIndexExn"), + ) + .into(), + ) + } + } + + #[derive(Clone, Debug)] + pub enum ListFTIndexesExn { + Success(crate::types::ListFTIndexesResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for ListFTIndexesExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + ListFTIndexesExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for ListFTIndexesExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for ListFTIndexesExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListFTIndexes"); + match self { + ListFTIndexesExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + ListFTIndexesExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for ListFTIndexesExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(ListFTIndexesExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "ListFTIndexesExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "ListFTIndexesExn"), + ) + .into(), + ) + } + } + #[derive(Clone, Debug)] pub enum CreateSessionExn { Success(crate::types::CreateSessionResp), @@ -21171,7 +22089,7 @@ pub mod services { #[derive(Clone, Debug)] pub enum UpdateSessionsExn { - Success(crate::types::ExecResp), + Success(crate::types::UpdateSessionsResp), ApplicationException(::fbthrift::ApplicationException), } @@ -21533,6 +22451,97 @@ pub mod services { } } + #[derive(Clone, Debug)] + pub enum KillQueryExn { + Success(crate::types::ExecResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for KillQueryExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + KillQueryExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for KillQueryExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for KillQueryExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("KillQuery"); + match self { + KillQueryExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + KillQueryExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for KillQueryExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(KillQueryExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "KillQueryExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "KillQueryExn"), + ) + .into(), + ) + } + } + #[derive(Clone, Debug)] pub enum ReportTaskFinishExn { Success(crate::types::ExecResp), @@ -21623,6 +22632,188 @@ pub mod services { ) } } + + #[derive(Clone, Debug)] + pub enum ListClusterExn { + Success(crate::types::ListClusterInfoResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for ListClusterExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + ListClusterExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for ListClusterExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for ListClusterExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListCluster"); + match self { + ListClusterExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + ListClusterExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for ListClusterExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(ListClusterExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "ListClusterExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "ListClusterExn"), + ) + .into(), + ) + } + } + + #[derive(Clone, Debug)] + pub enum GetMetaDirInfoExn { + Success(crate::types::GetMetaDirInfoResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for GetMetaDirInfoExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + GetMetaDirInfoExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for GetMetaDirInfoExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for GetMetaDirInfoExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("GetMetaDirInfo"); + match self { + GetMetaDirInfoExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + GetMetaDirInfoExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for GetMetaDirInfoExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(GetMetaDirInfoExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "GetMetaDirInfoExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "GetMetaDirInfoExn"), + ) + .into(), + ) + } + } } } @@ -21953,6 +23144,18 @@ pub mod client { &self, arg_req: &crate::types::ListFTClientsReq, ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn createFTIndex( + &self, + arg_req: &crate::types::CreateFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn dropFTIndex( + &self, + arg_req: &crate::types::DropFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn listFTIndexes( + &self, + arg_req: &crate::types::ListFTIndexesReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; fn createSession( &self, arg_req: &crate::types::CreateSessionReq, @@ -21960,7 +23163,7 @@ pub mod client { fn updateSessions( &self, arg_req: &crate::types::UpdateSessionsReq, - ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; fn listSessions( &self, arg_req: &crate::types::ListSessionsReq, @@ -21973,10 +23176,22 @@ pub mod client { &self, arg_req: &crate::types::RemoveSessionReq, ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn killQuery( + &self, + arg_req: &crate::types::KillQueryReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; fn reportTaskFinish( &self, arg_req: &crate::types::ReportTaskReq, ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn listCluster( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn getMetaDirInfo( + &self, + arg_req: &crate::types::GetMetaDirInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; } impl MetaService for MetaServiceImpl @@ -26241,6 +27456,174 @@ pub mod client { })) .boxed() } + fn createFTIndex( + &self, + arg_req: &crate::types::CreateFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "createFTIndex", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::CreateFTIndexExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::CreateFTIndexExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::CreateFTIndexExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::CreateFTIndexError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::CreateFTIndexError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::CreateFTIndexError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } + fn dropFTIndex( + &self, + arg_req: &crate::types::DropFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "dropFTIndex", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::DropFTIndexExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::DropFTIndexExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::DropFTIndexExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::DropFTIndexError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::DropFTIndexError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::DropFTIndexError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } + fn listFTIndexes( + &self, + arg_req: &crate::types::ListFTIndexesReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "listFTIndexes", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::ListFTIndexesExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::ListFTIndexesExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::ListFTIndexesExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::ListFTIndexesError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::ListFTIndexesError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::ListFTIndexesError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } fn createSession( &self, arg_req: &crate::types::CreateSessionReq, @@ -26300,7 +27683,7 @@ pub mod client { fn updateSessions( &self, arg_req: &crate::types::UpdateSessionsReq, - ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; use ::futures::future::{FutureExt as _, TryFutureExt as _}; let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( @@ -26325,7 +27708,7 @@ pub mod client { .map_err(::std::convert::From::from) .and_then(|reply| ::futures::future::ready({ let de = P::deserializer(reply); - move |mut p: P::Deserializer| -> ::std::result::Result { + move |mut p: P::Deserializer| -> ::std::result::Result { let p = &mut p; let (_, message_type, _) = p.read_message_begin(|_| ())?; let result = match message_type { @@ -26521,6 +27904,62 @@ pub mod client { })) .boxed() } + fn killQuery( + &self, + arg_req: &crate::types::KillQueryReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "killQuery", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::KillQueryExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::KillQueryExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::KillQueryExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::KillQueryError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::KillQueryError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::KillQueryError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } fn reportTaskFinish( &self, arg_req: &crate::types::ReportTaskReq, @@ -26577,6 +28016,118 @@ pub mod client { })) .boxed() } + fn listCluster( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "listCluster", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::ListClusterExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::ListClusterExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::ListClusterExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::ListClusterError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::ListClusterError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::ListClusterError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } + fn getMetaDirInfo( + &self, + arg_req: &crate::types::GetMetaDirInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "getMetaDirInfo", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::meta_service::GetMetaDirInfoExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::meta_service::GetMetaDirInfoExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::meta_service::GetMetaDirInfoExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::meta_service::GetMetaDirInfoError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::meta_service::GetMetaDirInfoError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::meta_service::GetMetaDirInfoError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } } impl<'a, T> MetaService for T @@ -27192,6 +28743,30 @@ pub mod client { arg_req, ) } + fn createFTIndex( + &self, + arg_req: &crate::types::CreateFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().createFTIndex( + arg_req, + ) + } + fn dropFTIndex( + &self, + arg_req: &crate::types::DropFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().dropFTIndex( + arg_req, + ) + } + fn listFTIndexes( + &self, + arg_req: &crate::types::ListFTIndexesReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().listFTIndexes( + arg_req, + ) + } fn createSession( &self, arg_req: &crate::types::CreateSessionReq, @@ -27203,7 +28778,7 @@ pub mod client { fn updateSessions( &self, arg_req: &crate::types::UpdateSessionsReq, - ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { self.as_ref().updateSessions( arg_req, ) @@ -27232,6 +28807,14 @@ pub mod client { arg_req, ) } + fn killQuery( + &self, + arg_req: &crate::types::KillQueryReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().killQuery( + arg_req, + ) + } fn reportTaskFinish( &self, arg_req: &crate::types::ReportTaskReq, @@ -27240,6 +28823,22 @@ pub mod client { arg_req, ) } + fn listCluster( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().listCluster( + arg_req, + ) + } + fn getMetaDirInfo( + &self, + arg_req: &crate::types::GetMetaDirInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().getMetaDirInfo( + arg_req, + ) + } } pub struct make_MetaService; @@ -28125,6 +29724,39 @@ pub mod server { ), )) } + async fn createFTIndex( + &self, + _req: crate::types::CreateFTIndexReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::CreateFTIndexExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "createFTIndex", + ), + )) + } + async fn dropFTIndex( + &self, + _req: crate::types::DropFTIndexReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::DropFTIndexExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "dropFTIndex", + ), + )) + } + async fn listFTIndexes( + &self, + _req: crate::types::ListFTIndexesReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::ListFTIndexesExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "listFTIndexes", + ), + )) + } async fn createSession( &self, _req: crate::types::CreateSessionReq, @@ -28139,7 +29771,7 @@ pub mod server { async fn updateSessions( &self, _req: crate::types::UpdateSessionsReq, - ) -> ::std::result::Result { + ) -> ::std::result::Result { ::std::result::Result::Err(crate::services::meta_service::UpdateSessionsExn::ApplicationException( ::fbthrift::ApplicationException::unimplemented_method( "MetaService", @@ -28180,6 +29812,17 @@ pub mod server { ), )) } + async fn killQuery( + &self, + _req: crate::types::KillQueryReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::KillQueryExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "killQuery", + ), + )) + } async fn reportTaskFinish( &self, _req: crate::types::ReportTaskReq, @@ -28191,6 +29834,28 @@ pub mod server { ), )) } + async fn listCluster( + &self, + _req: crate::types::ListClusterInfoReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::ListClusterExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "listCluster", + ), + )) + } + async fn getMetaDirInfo( + &self, + _req: crate::types::GetMetaDirInfoReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::meta_service::GetMetaDirInfoExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "MetaService", + "getMetaDirInfo", + ), + )) + } } #[derive(Clone, Debug)] @@ -28326,32 +29991,452 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropSpace( + let res = self.service.dropSpace( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "dropSpace", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::DropSpaceExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::DropSpaceExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::DropSpaceExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "dropSpace", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "dropSpace", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_getSpace<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.getSpace"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.getSpace( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "getSpace", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::GetSpaceExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::GetSpaceExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::GetSpaceExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "getSpace", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "getSpace", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_listSpaces<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.listSpaces"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.listSpaces( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "listSpaces", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::ListSpacesExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::ListSpacesExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::ListSpacesExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "listSpaces", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "listSpaces", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_createTag<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.createTag"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.createTag( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "createTag", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::CreateTagExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::CreateTagExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::CreateTagExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "createTag", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "createTag", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_alterTag<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.alterTag"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.alterTag( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "alterTag", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::AlterTagExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::AlterTagExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::AlterTagExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "alterTag", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "alterTag", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_dropTag<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.dropTag"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.dropTag( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "dropTag", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::meta_service::DropTagExn::Success(res) + } + ::std::result::Result::Err(crate::services::meta_service::DropTagExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::meta_service::DropTagExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "dropTag", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "dropTag", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } + + async fn handle_getTag<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "MetaService"; + METHOD_NAME = "MetaService.getTag"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.getTag( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropSpace", + "getTag", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropSpaceExn::Success(res) + crate::services::meta_service::GetTagExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropSpaceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetTagExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropSpaceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetTagExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropSpace", + "getTag", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropSpace", + "getTag", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28360,7 +30445,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getSpace<'a>( + async fn handle_listTags<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28371,7 +30456,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getSpace"; + METHOD_NAME = "MetaService.listTags"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28396,32 +30481,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getSpace( + let res = self.service.listTags( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getSpace", + "listTags", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetSpaceExn::Success(res) + crate::services::meta_service::ListTagsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetSpaceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetSpaceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getSpace", + "listTags", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getSpace", + "listTags", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28430,7 +30515,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listSpaces<'a>( + async fn handle_createEdge<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28441,7 +30526,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listSpaces"; + METHOD_NAME = "MetaService.createEdge"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28466,32 +30551,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listSpaces( + let res = self.service.createEdge( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listSpaces", + "createEdge", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListSpacesExn::Success(res) + crate::services::meta_service::CreateEdgeExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListSpacesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateEdgeExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListSpacesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateEdgeExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listSpaces", + "createEdge", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listSpaces", + "createEdge", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28500,7 +30585,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createTag<'a>( + async fn handle_alterEdge<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28511,7 +30596,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createTag"; + METHOD_NAME = "MetaService.alterEdge"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28536,32 +30621,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createTag( + let res = self.service.alterEdge( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createTag", + "alterEdge", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateTagExn::Success(res) + crate::services::meta_service::AlterEdgeExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateTagExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AlterEdgeExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateTagExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AlterEdgeExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createTag", + "alterEdge", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createTag", + "alterEdge", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28570,7 +30655,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_alterTag<'a>( + async fn handle_dropEdge<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28581,7 +30666,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.alterTag"; + METHOD_NAME = "MetaService.dropEdge"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28606,32 +30691,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.alterTag( + let res = self.service.dropEdge( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "alterTag", + "dropEdge", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AlterTagExn::Success(res) + crate::services::meta_service::DropEdgeExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AlterTagExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropEdgeExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AlterTagExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropEdgeExn::Success(_)) => { panic!( "{} attempted to return success via error", - "alterTag", + "dropEdge", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "alterTag", + "dropEdge", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28640,7 +30725,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropTag<'a>( + async fn handle_getEdge<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28651,7 +30736,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropTag"; + METHOD_NAME = "MetaService.getEdge"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28676,32 +30761,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropTag( + let res = self.service.getEdge( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropTag", + "getEdge", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropTagExn::Success(res) + crate::services::meta_service::GetEdgeExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropTagExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetEdgeExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropTagExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetEdgeExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropTag", + "getEdge", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropTag", + "getEdge", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28710,7 +30795,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getTag<'a>( + async fn handle_listEdges<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28721,7 +30806,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getTag"; + METHOD_NAME = "MetaService.listEdges"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28746,32 +30831,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getTag( + let res = self.service.listEdges( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getTag", + "listEdges", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetTagExn::Success(res) + crate::services::meta_service::ListEdgesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetTagExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetTagExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getTag", + "listEdges", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getTag", + "listEdges", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28780,7 +30865,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listTags<'a>( + async fn handle_listHosts<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28791,7 +30876,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listTags"; + METHOD_NAME = "MetaService.listHosts"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28816,32 +30901,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listTags( + let res = self.service.listHosts( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listTags", + "listHosts", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListTagsExn::Success(res) + crate::services::meta_service::ListHostsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListTagsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListHostsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListTagsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListHostsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listTags", + "listHosts", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listTags", + "listHosts", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28850,7 +30935,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createEdge<'a>( + async fn handle_getPartsAlloc<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28861,7 +30946,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createEdge"; + METHOD_NAME = "MetaService.getPartsAlloc"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28886,32 +30971,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createEdge( + let res = self.service.getPartsAlloc( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createEdge", + "getPartsAlloc", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateEdgeExn::Success(res) + crate::services::meta_service::GetPartsAllocExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateEdgeExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetPartsAllocExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateEdgeExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetPartsAllocExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createEdge", + "getPartsAlloc", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createEdge", + "getPartsAlloc", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28920,7 +31005,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_alterEdge<'a>( + async fn handle_listParts<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -28931,7 +31016,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.alterEdge"; + METHOD_NAME = "MetaService.listParts"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -28956,32 +31041,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.alterEdge( + let res = self.service.listParts( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "alterEdge", + "listParts", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AlterEdgeExn::Success(res) + crate::services::meta_service::ListPartsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AlterEdgeExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListPartsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AlterEdgeExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListPartsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "alterEdge", + "listParts", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "alterEdge", + "listParts", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -28990,7 +31075,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropEdge<'a>( + async fn handle_multiPut<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29001,7 +31086,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropEdge"; + METHOD_NAME = "MetaService.multiPut"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29026,32 +31111,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropEdge( + let res = self.service.multiPut( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropEdge", + "multiPut", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropEdgeExn::Success(res) + crate::services::meta_service::MultiPutExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropEdgeExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::MultiPutExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropEdgeExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::MultiPutExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropEdge", + "multiPut", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropEdge", + "multiPut", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29060,7 +31145,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getEdge<'a>( + async fn handle_get<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29071,7 +31156,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getEdge"; + METHOD_NAME = "MetaService.get"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29096,32 +31181,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getEdge( + let res = self.service.get( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getEdge", + "get", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetEdgeExn::Success(res) + crate::services::meta_service::GetExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetEdgeExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetEdgeExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getEdge", + "get", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getEdge", + "get", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29130,7 +31215,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listEdges<'a>( + async fn handle_multiGet<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29141,7 +31226,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listEdges"; + METHOD_NAME = "MetaService.multiGet"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29166,32 +31251,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listEdges( + let res = self.service.multiGet( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listEdges", + "multiGet", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListEdgesExn::Success(res) + crate::services::meta_service::MultiGetExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::MultiGetExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::MultiGetExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listEdges", + "multiGet", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listEdges", + "multiGet", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29200,7 +31285,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listHosts<'a>( + async fn handle_remove<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29211,7 +31296,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listHosts"; + METHOD_NAME = "MetaService.remove"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29236,32 +31321,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listHosts( + let res = self.service.remove( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listHosts", + "remove", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListHostsExn::Success(res) + crate::services::meta_service::RemoveExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListHostsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListHostsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listHosts", + "remove", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listHosts", + "remove", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29270,7 +31355,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getPartsAlloc<'a>( + async fn handle_removeRange<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29281,7 +31366,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getPartsAlloc"; + METHOD_NAME = "MetaService.removeRange"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29306,32 +31391,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getPartsAlloc( + let res = self.service.removeRange( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getPartsAlloc", + "removeRange", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetPartsAllocExn::Success(res) + crate::services::meta_service::RemoveRangeExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetPartsAllocExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveRangeExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetPartsAllocExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveRangeExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getPartsAlloc", + "removeRange", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getPartsAlloc", + "removeRange", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29340,7 +31425,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listParts<'a>( + async fn handle_scan<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29351,7 +31436,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listParts"; + METHOD_NAME = "MetaService.scan"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29376,32 +31461,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listParts( + let res = self.service.scan( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listParts", + "scan", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListPartsExn::Success(res) + crate::services::meta_service::ScanExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListPartsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ScanExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListPartsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ScanExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listParts", + "scan", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listParts", + "scan", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29410,7 +31495,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_multiPut<'a>( + async fn handle_createTagIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29421,7 +31506,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.multiPut"; + METHOD_NAME = "MetaService.createTagIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29446,32 +31531,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.multiPut( + let res = self.service.createTagIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "multiPut", + "createTagIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::MultiPutExn::Success(res) + crate::services::meta_service::CreateTagIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::MultiPutExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateTagIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::MultiPutExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateTagIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "multiPut", + "createTagIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "multiPut", + "createTagIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29480,7 +31565,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_get<'a>( + async fn handle_dropTagIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29491,7 +31576,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.get"; + METHOD_NAME = "MetaService.dropTagIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29516,32 +31601,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.get( + let res = self.service.dropTagIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "get", + "dropTagIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetExn::Success(res) + crate::services::meta_service::DropTagIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropTagIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropTagIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "get", + "dropTagIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "get", + "dropTagIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29550,7 +31635,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_multiGet<'a>( + async fn handle_getTagIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29561,7 +31646,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.multiGet"; + METHOD_NAME = "MetaService.getTagIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29586,32 +31671,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.multiGet( + let res = self.service.getTagIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "multiGet", + "getTagIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::MultiGetExn::Success(res) + crate::services::meta_service::GetTagIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::MultiGetExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetTagIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::MultiGetExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetTagIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "multiGet", + "getTagIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "multiGet", + "getTagIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29620,7 +31705,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_remove<'a>( + async fn handle_listTagIndexes<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29631,7 +31716,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.remove"; + METHOD_NAME = "MetaService.listTagIndexes"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29656,32 +31741,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.remove( + let res = self.service.listTagIndexes( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "remove", + "listTagIndexes", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RemoveExn::Success(res) + crate::services::meta_service::ListTagIndexesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RemoveExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagIndexesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RemoveExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagIndexesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "remove", + "listTagIndexes", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "remove", + "listTagIndexes", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29690,7 +31775,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_removeRange<'a>( + async fn handle_rebuildTagIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29701,7 +31786,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.removeRange"; + METHOD_NAME = "MetaService.rebuildTagIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29726,32 +31811,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.removeRange( + let res = self.service.rebuildTagIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "removeRange", + "rebuildTagIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RemoveRangeExn::Success(res) + crate::services::meta_service::RebuildTagIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RemoveRangeExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RebuildTagIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RemoveRangeExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RebuildTagIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "removeRange", + "rebuildTagIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "removeRange", + "rebuildTagIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29760,7 +31845,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_scan<'a>( + async fn handle_listTagIndexStatus<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29771,7 +31856,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.scan"; + METHOD_NAME = "MetaService.listTagIndexStatus"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29796,32 +31881,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.scan( + let res = self.service.listTagIndexStatus( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "scan", + "listTagIndexStatus", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ScanExn::Success(res) + crate::services::meta_service::ListTagIndexStatusExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ScanExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagIndexStatusExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ScanExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListTagIndexStatusExn::Success(_)) => { panic!( "{} attempted to return success via error", - "scan", + "listTagIndexStatus", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "scan", + "listTagIndexStatus", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29830,7 +31915,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createTagIndex<'a>( + async fn handle_createEdgeIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29841,7 +31926,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createTagIndex"; + METHOD_NAME = "MetaService.createEdgeIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29866,32 +31951,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createTagIndex( + let res = self.service.createEdgeIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createTagIndex", + "createEdgeIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateTagIndexExn::Success(res) + crate::services::meta_service::CreateEdgeIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateTagIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateEdgeIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateTagIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateEdgeIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createTagIndex", + "createEdgeIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createTagIndex", + "createEdgeIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29900,7 +31985,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropTagIndex<'a>( + async fn handle_dropEdgeIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29911,7 +31996,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropTagIndex"; + METHOD_NAME = "MetaService.dropEdgeIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -29936,32 +32021,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropTagIndex( + let res = self.service.dropEdgeIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropTagIndex", + "dropEdgeIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropTagIndexExn::Success(res) + crate::services::meta_service::DropEdgeIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropTagIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropEdgeIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropTagIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropEdgeIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropTagIndex", + "dropEdgeIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropTagIndex", + "dropEdgeIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -29970,7 +32055,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getTagIndex<'a>( + async fn handle_getEdgeIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -29981,7 +32066,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getTagIndex"; + METHOD_NAME = "MetaService.getEdgeIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30006,32 +32091,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getTagIndex( + let res = self.service.getEdgeIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getTagIndex", + "getEdgeIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetTagIndexExn::Success(res) + crate::services::meta_service::GetEdgeIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetTagIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetEdgeIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetTagIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetEdgeIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getTagIndex", + "getEdgeIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getTagIndex", + "getEdgeIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30040,7 +32125,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listTagIndexes<'a>( + async fn handle_listEdgeIndexes<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30051,7 +32136,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listTagIndexes"; + METHOD_NAME = "MetaService.listEdgeIndexes"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30076,32 +32161,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listTagIndexes( + let res = self.service.listEdgeIndexes( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listTagIndexes", + "listEdgeIndexes", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListTagIndexesExn::Success(res) + crate::services::meta_service::ListEdgeIndexesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListTagIndexesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListTagIndexesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listTagIndexes", + "listEdgeIndexes", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listTagIndexes", + "listEdgeIndexes", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30110,7 +32195,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_rebuildTagIndex<'a>( + async fn handle_rebuildEdgeIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30121,7 +32206,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.rebuildTagIndex"; + METHOD_NAME = "MetaService.rebuildEdgeIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30146,32 +32231,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.rebuildTagIndex( + let res = self.service.rebuildEdgeIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "rebuildTagIndex", + "rebuildEdgeIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RebuildTagIndexExn::Success(res) + crate::services::meta_service::RebuildEdgeIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RebuildTagIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RebuildEdgeIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RebuildTagIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RebuildEdgeIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "rebuildTagIndex", + "rebuildEdgeIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "rebuildTagIndex", + "rebuildEdgeIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30180,7 +32265,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listTagIndexStatus<'a>( + async fn handle_listEdgeIndexStatus<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30191,7 +32276,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listTagIndexStatus"; + METHOD_NAME = "MetaService.listEdgeIndexStatus"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30216,32 +32301,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listTagIndexStatus( + let res = self.service.listEdgeIndexStatus( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listTagIndexStatus", + "listEdgeIndexStatus", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListTagIndexStatusExn::Success(res) + crate::services::meta_service::ListEdgeIndexStatusExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListTagIndexStatusExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexStatusExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListTagIndexStatusExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexStatusExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listTagIndexStatus", + "listEdgeIndexStatus", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listTagIndexStatus", + "listEdgeIndexStatus", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30250,7 +32335,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createEdgeIndex<'a>( + async fn handle_createUser<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30261,7 +32346,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createEdgeIndex"; + METHOD_NAME = "MetaService.createUser"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30286,32 +32371,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createEdgeIndex( + let res = self.service.createUser( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createEdgeIndex", + "createUser", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateEdgeIndexExn::Success(res) + crate::services::meta_service::CreateUserExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateEdgeIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateUserExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateEdgeIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateUserExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createEdgeIndex", + "createUser", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createEdgeIndex", + "createUser", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30320,7 +32405,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropEdgeIndex<'a>( + async fn handle_dropUser<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30331,7 +32416,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropEdgeIndex"; + METHOD_NAME = "MetaService.dropUser"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30356,32 +32441,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropEdgeIndex( + let res = self.service.dropUser( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropEdgeIndex", + "dropUser", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropEdgeIndexExn::Success(res) + crate::services::meta_service::DropUserExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropEdgeIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropUserExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropEdgeIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropUserExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropEdgeIndex", + "dropUser", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropEdgeIndex", + "dropUser", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30390,7 +32475,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getEdgeIndex<'a>( + async fn handle_alterUser<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30401,7 +32486,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getEdgeIndex"; + METHOD_NAME = "MetaService.alterUser"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30426,32 +32511,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getEdgeIndex( + let res = self.service.alterUser( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getEdgeIndex", + "alterUser", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetEdgeIndexExn::Success(res) + crate::services::meta_service::AlterUserExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetEdgeIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AlterUserExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetEdgeIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AlterUserExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getEdgeIndex", + "alterUser", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getEdgeIndex", + "alterUser", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30460,7 +32545,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listEdgeIndexes<'a>( + async fn handle_grantRole<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30471,7 +32556,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listEdgeIndexes"; + METHOD_NAME = "MetaService.grantRole"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30496,32 +32581,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listEdgeIndexes( + let res = self.service.grantRole( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listEdgeIndexes", + "grantRole", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListEdgeIndexesExn::Success(res) + crate::services::meta_service::GrantRoleExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GrantRoleExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GrantRoleExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listEdgeIndexes", + "grantRole", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listEdgeIndexes", + "grantRole", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30530,7 +32615,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_rebuildEdgeIndex<'a>( + async fn handle_revokeRole<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30541,7 +32626,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.rebuildEdgeIndex"; + METHOD_NAME = "MetaService.revokeRole"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30566,32 +32651,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.rebuildEdgeIndex( + let res = self.service.revokeRole( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "rebuildEdgeIndex", + "revokeRole", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RebuildEdgeIndexExn::Success(res) + crate::services::meta_service::RevokeRoleExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RebuildEdgeIndexExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RevokeRoleExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RebuildEdgeIndexExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RevokeRoleExn::Success(_)) => { panic!( "{} attempted to return success via error", - "rebuildEdgeIndex", + "revokeRole", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "rebuildEdgeIndex", + "revokeRole", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30600,7 +32685,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listEdgeIndexStatus<'a>( + async fn handle_listUsers<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30611,7 +32696,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listEdgeIndexStatus"; + METHOD_NAME = "MetaService.listUsers"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30636,32 +32721,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listEdgeIndexStatus( + let res = self.service.listUsers( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listEdgeIndexStatus", + "listUsers", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListEdgeIndexStatusExn::Success(res) + crate::services::meta_service::ListUsersExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexStatusExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListUsersExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListEdgeIndexStatusExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListUsersExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listEdgeIndexStatus", + "listUsers", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listEdgeIndexStatus", + "listUsers", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30670,7 +32755,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createUser<'a>( + async fn handle_listRoles<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30681,7 +32766,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createUser"; + METHOD_NAME = "MetaService.listRoles"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30706,32 +32791,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createUser( + let res = self.service.listRoles( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createUser", + "listRoles", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateUserExn::Success(res) + crate::services::meta_service::ListRolesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateUserExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListRolesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateUserExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListRolesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createUser", + "listRoles", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createUser", + "listRoles", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30740,7 +32825,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropUser<'a>( + async fn handle_getUserRoles<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30751,7 +32836,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropUser"; + METHOD_NAME = "MetaService.getUserRoles"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30776,32 +32861,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropUser( + let res = self.service.getUserRoles( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropUser", + "getUserRoles", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropUserExn::Success(res) + crate::services::meta_service::GetUserRolesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropUserExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetUserRolesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropUserExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetUserRolesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropUser", + "getUserRoles", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropUser", + "getUserRoles", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30810,7 +32895,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_alterUser<'a>( + async fn handle_changePassword<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30821,7 +32906,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.alterUser"; + METHOD_NAME = "MetaService.changePassword"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30846,32 +32931,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.alterUser( + let res = self.service.changePassword( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "alterUser", + "changePassword", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AlterUserExn::Success(res) + crate::services::meta_service::ChangePasswordExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AlterUserExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ChangePasswordExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AlterUserExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ChangePasswordExn::Success(_)) => { panic!( "{} attempted to return success via error", - "alterUser", + "changePassword", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "alterUser", + "changePassword", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30880,7 +32965,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_grantRole<'a>( + async fn handle_heartBeat<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30891,7 +32976,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.grantRole"; + METHOD_NAME = "MetaService.heartBeat"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30916,32 +33001,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.grantRole( + let res = self.service.heartBeat( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "grantRole", + "heartBeat", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GrantRoleExn::Success(res) + crate::services::meta_service::HeartBeatExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GrantRoleExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::HeartBeatExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GrantRoleExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::HeartBeatExn::Success(_)) => { panic!( "{} attempted to return success via error", - "grantRole", + "heartBeat", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "grantRole", + "heartBeat", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -30950,7 +33035,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_revokeRole<'a>( + async fn handle_balance<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -30961,7 +33046,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.revokeRole"; + METHOD_NAME = "MetaService.balance"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -30986,32 +33071,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.revokeRole( + let res = self.service.balance( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "revokeRole", + "balance", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RevokeRoleExn::Success(res) + crate::services::meta_service::BalanceExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RevokeRoleExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::BalanceExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RevokeRoleExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::BalanceExn::Success(_)) => { panic!( "{} attempted to return success via error", - "revokeRole", + "balance", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "revokeRole", + "balance", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31020,7 +33105,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listUsers<'a>( + async fn handle_leaderBalance<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31031,7 +33116,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listUsers"; + METHOD_NAME = "MetaService.leaderBalance"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31056,32 +33141,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listUsers( + let res = self.service.leaderBalance( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listUsers", + "leaderBalance", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListUsersExn::Success(res) + crate::services::meta_service::LeaderBalanceExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListUsersExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::LeaderBalanceExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListUsersExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::LeaderBalanceExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listUsers", + "leaderBalance", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listUsers", + "leaderBalance", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31090,7 +33175,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listRoles<'a>( + async fn handle_regConfig<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31101,7 +33186,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listRoles"; + METHOD_NAME = "MetaService.regConfig"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31126,32 +33211,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listRoles( + let res = self.service.regConfig( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listRoles", + "regConfig", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListRolesExn::Success(res) + crate::services::meta_service::RegConfigExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListRolesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RegConfigExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListRolesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RegConfigExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listRoles", + "regConfig", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listRoles", + "regConfig", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31160,7 +33245,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getUserRoles<'a>( + async fn handle_getConfig<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31171,7 +33256,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getUserRoles"; + METHOD_NAME = "MetaService.getConfig"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31196,32 +33281,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getUserRoles( + let res = self.service.getConfig( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getUserRoles", + "getConfig", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetUserRolesExn::Success(res) + crate::services::meta_service::GetConfigExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetUserRolesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetConfigExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetUserRolesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetConfigExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getUserRoles", + "getConfig", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getUserRoles", + "getConfig", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31230,7 +33315,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_changePassword<'a>( + async fn handle_setConfig<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31241,7 +33326,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.changePassword"; + METHOD_NAME = "MetaService.setConfig"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31266,32 +33351,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.changePassword( + let res = self.service.setConfig( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "changePassword", + "setConfig", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ChangePasswordExn::Success(res) + crate::services::meta_service::SetConfigExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ChangePasswordExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::SetConfigExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ChangePasswordExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::SetConfigExn::Success(_)) => { panic!( "{} attempted to return success via error", - "changePassword", + "setConfig", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "changePassword", + "setConfig", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31300,7 +33385,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_heartBeat<'a>( + async fn handle_listConfigs<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31311,7 +33396,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.heartBeat"; + METHOD_NAME = "MetaService.listConfigs"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31336,32 +33421,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.heartBeat( + let res = self.service.listConfigs( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "heartBeat", + "listConfigs", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::HeartBeatExn::Success(res) + crate::services::meta_service::ListConfigsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::HeartBeatExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListConfigsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::HeartBeatExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListConfigsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "heartBeat", + "listConfigs", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "heartBeat", + "listConfigs", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31370,7 +33455,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_balance<'a>( + async fn handle_createSnapshot<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31381,7 +33466,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.balance"; + METHOD_NAME = "MetaService.createSnapshot"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31406,32 +33491,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.balance( + let res = self.service.createSnapshot( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "balance", + "createSnapshot", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::BalanceExn::Success(res) + crate::services::meta_service::CreateSnapshotExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::BalanceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateSnapshotExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::BalanceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateSnapshotExn::Success(_)) => { panic!( "{} attempted to return success via error", - "balance", + "createSnapshot", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "balance", + "createSnapshot", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31440,7 +33525,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_leaderBalance<'a>( + async fn handle_dropSnapshot<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31451,7 +33536,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.leaderBalance"; + METHOD_NAME = "MetaService.dropSnapshot"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31476,32 +33561,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.leaderBalance( + let res = self.service.dropSnapshot( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "leaderBalance", + "dropSnapshot", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::LeaderBalanceExn::Success(res) + crate::services::meta_service::DropSnapshotExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::LeaderBalanceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropSnapshotExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::LeaderBalanceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropSnapshotExn::Success(_)) => { panic!( "{} attempted to return success via error", - "leaderBalance", + "dropSnapshot", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "leaderBalance", + "dropSnapshot", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31510,7 +33595,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_regConfig<'a>( + async fn handle_listSnapshots<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31521,7 +33606,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.regConfig"; + METHOD_NAME = "MetaService.listSnapshots"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31546,32 +33631,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.regConfig( + let res = self.service.listSnapshots( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "regConfig", + "listSnapshots", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RegConfigExn::Success(res) + crate::services::meta_service::ListSnapshotsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RegConfigExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListSnapshotsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RegConfigExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListSnapshotsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "regConfig", + "listSnapshots", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "regConfig", + "listSnapshots", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31580,7 +33665,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getConfig<'a>( + async fn handle_runAdminJob<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31591,7 +33676,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getConfig"; + METHOD_NAME = "MetaService.runAdminJob"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31616,32 +33701,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getConfig( + let res = self.service.runAdminJob( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getConfig", + "runAdminJob", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetConfigExn::Success(res) + crate::services::meta_service::RunAdminJobExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetConfigExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RunAdminJobExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetConfigExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RunAdminJobExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getConfig", + "runAdminJob", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getConfig", + "runAdminJob", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31650,7 +33735,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_setConfig<'a>( + async fn handle_addZone<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31661,7 +33746,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.setConfig"; + METHOD_NAME = "MetaService.addZone"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31686,32 +33771,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.setConfig( + let res = self.service.addZone( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "setConfig", + "addZone", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::SetConfigExn::Success(res) + crate::services::meta_service::AddZoneExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::SetConfigExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AddZoneExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::SetConfigExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AddZoneExn::Success(_)) => { panic!( "{} attempted to return success via error", - "setConfig", + "addZone", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "setConfig", + "addZone", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31720,7 +33805,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listConfigs<'a>( + async fn handle_dropZone<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31731,7 +33816,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listConfigs"; + METHOD_NAME = "MetaService.dropZone"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31756,32 +33841,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listConfigs( + let res = self.service.dropZone( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listConfigs", + "dropZone", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListConfigsExn::Success(res) + crate::services::meta_service::DropZoneExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListConfigsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropZoneExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListConfigsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropZoneExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listConfigs", + "dropZone", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listConfigs", + "dropZone", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31790,7 +33875,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createSnapshot<'a>( + async fn handle_addHostIntoZone<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31801,7 +33886,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createSnapshot"; + METHOD_NAME = "MetaService.addHostIntoZone"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31826,32 +33911,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createSnapshot( + let res = self.service.addHostIntoZone( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createSnapshot", + "addHostIntoZone", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateSnapshotExn::Success(res) + crate::services::meta_service::AddHostIntoZoneExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateSnapshotExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AddHostIntoZoneExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateSnapshotExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AddHostIntoZoneExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createSnapshot", + "addHostIntoZone", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createSnapshot", + "addHostIntoZone", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31860,7 +33945,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropSnapshot<'a>( + async fn handle_dropHostFromZone<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31871,7 +33956,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropSnapshot"; + METHOD_NAME = "MetaService.dropHostFromZone"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31896,32 +33981,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropSnapshot( + let res = self.service.dropHostFromZone( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropSnapshot", + "dropHostFromZone", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropSnapshotExn::Success(res) + crate::services::meta_service::DropHostFromZoneExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropSnapshotExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropHostFromZoneExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropSnapshotExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropHostFromZoneExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropSnapshot", + "dropHostFromZone", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropSnapshot", + "dropHostFromZone", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -31930,7 +34015,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listSnapshots<'a>( + async fn handle_getZone<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -31941,7 +34026,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listSnapshots"; + METHOD_NAME = "MetaService.getZone"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -31966,32 +34051,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listSnapshots( + let res = self.service.getZone( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listSnapshots", + "getZone", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListSnapshotsExn::Success(res) + crate::services::meta_service::GetZoneExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListSnapshotsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetZoneExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListSnapshotsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetZoneExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listSnapshots", + "getZone", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listSnapshots", + "getZone", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32000,7 +34085,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_runAdminJob<'a>( + async fn handle_listZones<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32011,7 +34096,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.runAdminJob"; + METHOD_NAME = "MetaService.listZones"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32036,32 +34121,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.runAdminJob( + let res = self.service.listZones( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "runAdminJob", + "listZones", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RunAdminJobExn::Success(res) + crate::services::meta_service::ListZonesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RunAdminJobExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListZonesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RunAdminJobExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListZonesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "runAdminJob", + "listZones", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "runAdminJob", + "listZones", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32070,7 +34155,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_addZone<'a>( + async fn handle_addGroup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32081,7 +34166,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.addZone"; + METHOD_NAME = "MetaService.addGroup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32106,32 +34191,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.addZone( + let res = self.service.addGroup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "addZone", + "addGroup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AddZoneExn::Success(res) + crate::services::meta_service::AddGroupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AddZoneExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AddGroupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AddZoneExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AddGroupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "addZone", + "addGroup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "addZone", + "addGroup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32140,7 +34225,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropZone<'a>( + async fn handle_dropGroup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32151,7 +34236,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropZone"; + METHOD_NAME = "MetaService.dropGroup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32176,32 +34261,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropZone( + let res = self.service.dropGroup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropZone", + "dropGroup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropZoneExn::Success(res) + crate::services::meta_service::DropGroupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropZoneExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropGroupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropZoneExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropGroupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropZone", + "dropGroup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropZone", + "dropGroup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32210,7 +34295,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_addHostIntoZone<'a>( + async fn handle_addZoneIntoGroup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32221,7 +34306,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.addHostIntoZone"; + METHOD_NAME = "MetaService.addZoneIntoGroup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32246,32 +34331,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.addHostIntoZone( + let res = self.service.addZoneIntoGroup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "addHostIntoZone", + "addZoneIntoGroup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AddHostIntoZoneExn::Success(res) + crate::services::meta_service::AddZoneIntoGroupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AddHostIntoZoneExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AddZoneIntoGroupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AddHostIntoZoneExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AddZoneIntoGroupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "addHostIntoZone", + "addZoneIntoGroup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "addHostIntoZone", + "addZoneIntoGroup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32280,7 +34365,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropHostFromZone<'a>( + async fn handle_dropZoneFromGroup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32291,7 +34376,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropHostFromZone"; + METHOD_NAME = "MetaService.dropZoneFromGroup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32316,32 +34401,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropHostFromZone( + let res = self.service.dropZoneFromGroup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropHostFromZone", + "dropZoneFromGroup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropHostFromZoneExn::Success(res) + crate::services::meta_service::DropZoneFromGroupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropHostFromZoneExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropZoneFromGroupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropHostFromZoneExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropZoneFromGroupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropHostFromZone", + "dropZoneFromGroup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropHostFromZone", + "dropZoneFromGroup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32350,7 +34435,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getZone<'a>( + async fn handle_getGroup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32361,7 +34446,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getZone"; + METHOD_NAME = "MetaService.getGroup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32386,32 +34471,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getZone( + let res = self.service.getGroup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getZone", + "getGroup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetZoneExn::Success(res) + crate::services::meta_service::GetGroupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetZoneExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetGroupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetZoneExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetGroupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getZone", + "getGroup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getZone", + "getGroup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32420,7 +34505,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listZones<'a>( + async fn handle_listGroups<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32431,7 +34516,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listZones"; + METHOD_NAME = "MetaService.listGroups"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32456,32 +34541,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listZones( + let res = self.service.listGroups( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listZones", + "listGroups", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListZonesExn::Success(res) + crate::services::meta_service::ListGroupsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListZonesExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListGroupsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListZonesExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListGroupsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listZones", + "listGroups", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listZones", + "listGroups", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32490,7 +34575,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_addGroup<'a>( + async fn handle_createBackup<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32501,7 +34586,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.addGroup"; + METHOD_NAME = "MetaService.createBackup"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32526,32 +34611,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.addGroup( + let res = self.service.createBackup( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "addGroup", + "createBackup", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AddGroupExn::Success(res) + crate::services::meta_service::CreateBackupExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AddGroupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateBackupExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AddGroupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateBackupExn::Success(_)) => { panic!( "{} attempted to return success via error", - "addGroup", + "createBackup", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "addGroup", + "createBackup", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32560,7 +34645,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropGroup<'a>( + async fn handle_restoreMeta<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32571,7 +34656,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropGroup"; + METHOD_NAME = "MetaService.restoreMeta"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32596,32 +34681,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropGroup( + let res = self.service.restoreMeta( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropGroup", + "restoreMeta", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropGroupExn::Success(res) + crate::services::meta_service::RestoreMetaExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropGroupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RestoreMetaExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropGroupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RestoreMetaExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropGroup", + "restoreMeta", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropGroup", + "restoreMeta", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32630,7 +34715,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_addZoneIntoGroup<'a>( + async fn handle_addListener<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32641,7 +34726,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.addZoneIntoGroup"; + METHOD_NAME = "MetaService.addListener"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32666,32 +34751,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.addZoneIntoGroup( + let res = self.service.addListener( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "addZoneIntoGroup", + "addListener", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AddZoneIntoGroupExn::Success(res) + crate::services::meta_service::AddListenerExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AddZoneIntoGroupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::AddListenerExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AddZoneIntoGroupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::AddListenerExn::Success(_)) => { panic!( "{} attempted to return success via error", - "addZoneIntoGroup", + "addListener", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "addZoneIntoGroup", + "addListener", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32700,7 +34785,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_dropZoneFromGroup<'a>( + async fn handle_removeListener<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32711,7 +34796,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.dropZoneFromGroup"; + METHOD_NAME = "MetaService.removeListener"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32736,32 +34821,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.dropZoneFromGroup( + let res = self.service.removeListener( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "dropZoneFromGroup", + "removeListener", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::DropZoneFromGroupExn::Success(res) + crate::services::meta_service::RemoveListenerExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::DropZoneFromGroupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveListenerExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::DropZoneFromGroupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveListenerExn::Success(_)) => { panic!( "{} attempted to return success via error", - "dropZoneFromGroup", + "removeListener", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "dropZoneFromGroup", + "removeListener", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32770,7 +34855,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getGroup<'a>( + async fn handle_listListener<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32781,7 +34866,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getGroup"; + METHOD_NAME = "MetaService.listListener"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32806,32 +34891,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getGroup( + let res = self.service.listListener( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getGroup", + "listListener", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetGroupExn::Success(res) + crate::services::meta_service::ListListenerExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetGroupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListListenerExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetGroupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListListenerExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getGroup", + "listListener", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getGroup", + "listListener", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32840,7 +34925,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listGroups<'a>( + async fn handle_getStatis<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32851,7 +34936,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listGroups"; + METHOD_NAME = "MetaService.getStatis"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32876,32 +34961,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listGroups( + let res = self.service.getStatis( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listGroups", + "getStatis", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListGroupsExn::Success(res) + crate::services::meta_service::GetStatisExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListGroupsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetStatisExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListGroupsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetStatisExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listGroups", + "getStatis", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listGroups", + "getStatis", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32910,7 +34995,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createBackup<'a>( + async fn handle_signInFTService<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32921,7 +35006,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createBackup"; + METHOD_NAME = "MetaService.signInFTService"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -32946,32 +35031,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createBackup( + let res = self.service.signInFTService( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createBackup", + "signInFTService", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateBackupExn::Success(res) + crate::services::meta_service::SignInFTServiceExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateBackupExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::SignInFTServiceExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateBackupExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::SignInFTServiceExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createBackup", + "signInFTService", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createBackup", + "signInFTService", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -32980,7 +35065,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_restoreMeta<'a>( + async fn handle_signOutFTService<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -32991,7 +35076,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.restoreMeta"; + METHOD_NAME = "MetaService.signOutFTService"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33016,32 +35101,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.restoreMeta( + let res = self.service.signOutFTService( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "restoreMeta", + "signOutFTService", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RestoreMetaExn::Success(res) + crate::services::meta_service::SignOutFTServiceExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RestoreMetaExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::SignOutFTServiceExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RestoreMetaExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::SignOutFTServiceExn::Success(_)) => { panic!( "{} attempted to return success via error", - "restoreMeta", + "signOutFTService", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "restoreMeta", + "signOutFTService", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33050,7 +35135,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_addListener<'a>( + async fn handle_listFTClients<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33061,7 +35146,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.addListener"; + METHOD_NAME = "MetaService.listFTClients"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33086,32 +35171,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.addListener( + let res = self.service.listFTClients( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "addListener", + "listFTClients", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::AddListenerExn::Success(res) + crate::services::meta_service::ListFTClientsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::AddListenerExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListFTClientsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::AddListenerExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListFTClientsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "addListener", + "listFTClients", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "addListener", + "listFTClients", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33120,7 +35205,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_removeListener<'a>( + async fn handle_createFTIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33131,7 +35216,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.removeListener"; + METHOD_NAME = "MetaService.createFTIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33156,32 +35241,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.removeListener( + let res = self.service.createFTIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "removeListener", + "createFTIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RemoveListenerExn::Success(res) + crate::services::meta_service::CreateFTIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RemoveListenerExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateFTIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RemoveListenerExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateFTIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "removeListener", + "createFTIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "removeListener", + "createFTIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33190,7 +35275,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listListener<'a>( + async fn handle_dropFTIndex<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33201,7 +35286,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listListener"; + METHOD_NAME = "MetaService.dropFTIndex"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33226,32 +35311,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listListener( + let res = self.service.dropFTIndex( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listListener", + "dropFTIndex", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListListenerExn::Success(res) + crate::services::meta_service::DropFTIndexExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListListenerExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::DropFTIndexExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListListenerExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::DropFTIndexExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listListener", + "dropFTIndex", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listListener", + "dropFTIndex", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33260,7 +35345,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getStatis<'a>( + async fn handle_listFTIndexes<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33271,7 +35356,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getStatis"; + METHOD_NAME = "MetaService.listFTIndexes"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33296,32 +35381,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getStatis( + let res = self.service.listFTIndexes( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getStatis", + "listFTIndexes", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetStatisExn::Success(res) + crate::services::meta_service::ListFTIndexesExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetStatisExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListFTIndexesExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetStatisExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListFTIndexesExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getStatis", + "listFTIndexes", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getStatis", + "listFTIndexes", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33330,7 +35415,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_signInFTService<'a>( + async fn handle_createSession<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33341,7 +35426,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.signInFTService"; + METHOD_NAME = "MetaService.createSession"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33366,32 +35451,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.signInFTService( + let res = self.service.createSession( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "signInFTService", + "createSession", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::SignInFTServiceExn::Success(res) + crate::services::meta_service::CreateSessionExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::SignInFTServiceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateSessionExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::SignInFTServiceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::CreateSessionExn::Success(_)) => { panic!( "{} attempted to return success via error", - "signInFTService", + "createSession", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "signInFTService", + "createSession", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33400,7 +35485,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_signOutFTService<'a>( + async fn handle_updateSessions<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33411,7 +35496,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.signOutFTService"; + METHOD_NAME = "MetaService.updateSessions"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33436,32 +35521,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.signOutFTService( + let res = self.service.updateSessions( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "signOutFTService", + "updateSessions", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::SignOutFTServiceExn::Success(res) + crate::services::meta_service::UpdateSessionsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::SignOutFTServiceExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::UpdateSessionsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::SignOutFTServiceExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::UpdateSessionsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "signOutFTService", + "updateSessions", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "signOutFTService", + "updateSessions", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33470,7 +35555,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listFTClients<'a>( + async fn handle_listSessions<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33481,7 +35566,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listFTClients"; + METHOD_NAME = "MetaService.listSessions"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33506,32 +35591,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listFTClients( + let res = self.service.listSessions( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listFTClients", + "listSessions", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListFTClientsExn::Success(res) + crate::services::meta_service::ListSessionsExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListFTClientsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListSessionsExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListFTClientsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListSessionsExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listFTClients", + "listSessions", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listFTClients", + "listSessions", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33540,7 +35625,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_createSession<'a>( + async fn handle_getSession<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33551,7 +35636,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.createSession"; + METHOD_NAME = "MetaService.getSession"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33576,32 +35661,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.createSession( + let res = self.service.getSession( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "createSession", + "getSession", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::CreateSessionExn::Success(res) + crate::services::meta_service::GetSessionExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::CreateSessionExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetSessionExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::CreateSessionExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetSessionExn::Success(_)) => { panic!( "{} attempted to return success via error", - "createSession", + "getSession", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "createSession", + "getSession", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33610,7 +35695,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_updateSessions<'a>( + async fn handle_removeSession<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33621,7 +35706,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.updateSessions"; + METHOD_NAME = "MetaService.removeSession"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33646,32 +35731,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.updateSessions( + let res = self.service.removeSession( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "updateSessions", + "removeSession", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::UpdateSessionsExn::Success(res) + crate::services::meta_service::RemoveSessionExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::UpdateSessionsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveSessionExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::UpdateSessionsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::RemoveSessionExn::Success(_)) => { panic!( "{} attempted to return success via error", - "updateSessions", + "removeSession", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "updateSessions", + "removeSession", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33680,7 +35765,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_listSessions<'a>( + async fn handle_killQuery<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33691,7 +35776,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.listSessions"; + METHOD_NAME = "MetaService.killQuery"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33716,32 +35801,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.listSessions( + let res = self.service.killQuery( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "listSessions", + "killQuery", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ListSessionsExn::Success(res) + crate::services::meta_service::KillQueryExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ListSessionsExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::KillQueryExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ListSessionsExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::KillQueryExn::Success(_)) => { panic!( "{} attempted to return success via error", - "listSessions", + "killQuery", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "listSessions", + "killQuery", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33750,7 +35835,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_getSession<'a>( + async fn handle_reportTaskFinish<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33761,7 +35846,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.getSession"; + METHOD_NAME = "MetaService.reportTaskFinish"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33786,32 +35871,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.getSession( + let res = self.service.reportTaskFinish( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "getSession", + "reportTaskFinish", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::GetSessionExn::Success(res) + crate::services::meta_service::ReportTaskFinishExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::GetSessionExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ReportTaskFinishExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::GetSessionExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ReportTaskFinishExn::Success(_)) => { panic!( "{} attempted to return success via error", - "getSession", + "reportTaskFinish", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "getSession", + "reportTaskFinish", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33820,7 +35905,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_removeSession<'a>( + async fn handle_listCluster<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33831,7 +35916,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.removeSession"; + METHOD_NAME = "MetaService.listCluster"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33856,32 +35941,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.removeSession( + let res = self.service.listCluster( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "removeSession", + "listCluster", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::RemoveSessionExn::Success(res) + crate::services::meta_service::ListClusterExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::RemoveSessionExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::ListClusterExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::RemoveSessionExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::ListClusterExn::Success(_)) => { panic!( "{} attempted to return success via error", - "removeSession", + "listCluster", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "removeSession", + "listCluster", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -33890,7 +35975,7 @@ pub mod server { ::std::result::Result::Ok(res) } - async fn handle_reportTaskFinish<'a>( + async fn handle_getMetaDirInfo<'a>( &'a self, p: &'a mut P::Deserializer, req_ctxt: &R, @@ -33901,7 +35986,7 @@ pub mod server { const_cstr! { SERVICE_NAME = "MetaService"; - METHOD_NAME = "MetaService.reportTaskFinish"; + METHOD_NAME = "MetaService.getMetaDirInfo"; } let mut ctx_stack = req_ctxt.get_context_stack( &SERVICE_NAME, @@ -33926,32 +36011,32 @@ pub mod server { } p.read_struct_end()?; ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; - let res = self.service.reportTaskFinish( + let res = self.service.getMetaDirInfo( field_req.ok_or_else(|| { ::fbthrift::ApplicationException::missing_arg( - "reportTaskFinish", + "getMetaDirInfo", "req", ) })?, ).await; let res = match res { ::std::result::Result::Ok(res) => { - crate::services::meta_service::ReportTaskFinishExn::Success(res) + crate::services::meta_service::GetMetaDirInfoExn::Success(res) } - ::std::result::Result::Err(crate::services::meta_service::ReportTaskFinishExn::ApplicationException(aexn)) => { + ::std::result::Result::Err(crate::services::meta_service::GetMetaDirInfoExn::ApplicationException(aexn)) => { return ::std::result::Result::Err(aexn.into()) } - ::std::result::Result::Err(crate::services::meta_service::ReportTaskFinishExn::Success(_)) => { + ::std::result::Result::Err(crate::services::meta_service::GetMetaDirInfoExn::Success(_)) => { panic!( "{} attempted to return success via error", - "reportTaskFinish", + "getMetaDirInfo", ) } }; ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( p, - "reportTaskFinish", + "getMetaDirInfo", ::fbthrift::MessageType::Reply, seqid, |p| ::fbthrift::Serialize::write(&res, p), @@ -34051,12 +36136,18 @@ pub mod server { b"signInFTService" => ::std::result::Result::Ok(73usize), b"signOutFTService" => ::std::result::Result::Ok(74usize), b"listFTClients" => ::std::result::Result::Ok(75usize), - b"createSession" => ::std::result::Result::Ok(76usize), - b"updateSessions" => ::std::result::Result::Ok(77usize), - b"listSessions" => ::std::result::Result::Ok(78usize), - b"getSession" => ::std::result::Result::Ok(79usize), - b"removeSession" => ::std::result::Result::Ok(80usize), - b"reportTaskFinish" => ::std::result::Result::Ok(81usize), + b"createFTIndex" => ::std::result::Result::Ok(76usize), + b"dropFTIndex" => ::std::result::Result::Ok(77usize), + b"listFTIndexes" => ::std::result::Result::Ok(78usize), + b"createSession" => ::std::result::Result::Ok(79usize), + b"updateSessions" => ::std::result::Result::Ok(80usize), + b"listSessions" => ::std::result::Result::Ok(81usize), + b"getSession" => ::std::result::Result::Ok(82usize), + b"removeSession" => ::std::result::Result::Ok(83usize), + b"killQuery" => ::std::result::Result::Ok(84usize), + b"reportTaskFinish" => ::std::result::Result::Ok(85usize), + b"listCluster" => ::std::result::Result::Ok(86usize), + b"getMetaDirInfo" => ::std::result::Result::Ok(87usize), _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()), } } @@ -34145,12 +36236,18 @@ pub mod server { 73usize => self.handle_signInFTService(_p, _r, _seqid).await, 74usize => self.handle_signOutFTService(_p, _r, _seqid).await, 75usize => self.handle_listFTClients(_p, _r, _seqid).await, - 76usize => self.handle_createSession(_p, _r, _seqid).await, - 77usize => self.handle_updateSessions(_p, _r, _seqid).await, - 78usize => self.handle_listSessions(_p, _r, _seqid).await, - 79usize => self.handle_getSession(_p, _r, _seqid).await, - 80usize => self.handle_removeSession(_p, _r, _seqid).await, - 81usize => self.handle_reportTaskFinish(_p, _r, _seqid).await, + 76usize => self.handle_createFTIndex(_p, _r, _seqid).await, + 77usize => self.handle_dropFTIndex(_p, _r, _seqid).await, + 78usize => self.handle_listFTIndexes(_p, _r, _seqid).await, + 79usize => self.handle_createSession(_p, _r, _seqid).await, + 80usize => self.handle_updateSessions(_p, _r, _seqid).await, + 81usize => self.handle_listSessions(_p, _r, _seqid).await, + 82usize => self.handle_getSession(_p, _r, _seqid).await, + 83usize => self.handle_removeSession(_p, _r, _seqid).await, + 84usize => self.handle_killQuery(_p, _r, _seqid).await, + 85usize => self.handle_reportTaskFinish(_p, _r, _seqid).await, + 86usize => self.handle_listCluster(_p, _r, _seqid).await, + 87usize => self.handle_getMetaDirInfo(_p, _r, _seqid).await, bad => panic!( "{}: unexpected method idx {}", "MetaServiceProcessor", @@ -34410,12 +36507,18 @@ pub mod mock { pub signInFTService: r#impl::meta_service::signInFTService<'mock>, pub signOutFTService: r#impl::meta_service::signOutFTService<'mock>, pub listFTClients: r#impl::meta_service::listFTClients<'mock>, + pub createFTIndex: r#impl::meta_service::createFTIndex<'mock>, + pub dropFTIndex: r#impl::meta_service::dropFTIndex<'mock>, + pub listFTIndexes: r#impl::meta_service::listFTIndexes<'mock>, pub createSession: r#impl::meta_service::createSession<'mock>, pub updateSessions: r#impl::meta_service::updateSessions<'mock>, pub listSessions: r#impl::meta_service::listSessions<'mock>, pub getSession: r#impl::meta_service::getSession<'mock>, pub removeSession: r#impl::meta_service::removeSession<'mock>, + pub killQuery: r#impl::meta_service::killQuery<'mock>, pub reportTaskFinish: r#impl::meta_service::reportTaskFinish<'mock>, + pub listCluster: r#impl::meta_service::listCluster<'mock>, + pub getMetaDirInfo: r#impl::meta_service::getMetaDirInfo<'mock>, _marker: ::std::marker::PhantomData<&'mock ()>, } @@ -34498,12 +36601,18 @@ pub mod mock { signInFTService: r#impl::meta_service::signInFTService::unimplemented(), signOutFTService: r#impl::meta_service::signOutFTService::unimplemented(), listFTClients: r#impl::meta_service::listFTClients::unimplemented(), + createFTIndex: r#impl::meta_service::createFTIndex::unimplemented(), + dropFTIndex: r#impl::meta_service::dropFTIndex::unimplemented(), + listFTIndexes: r#impl::meta_service::listFTIndexes::unimplemented(), createSession: r#impl::meta_service::createSession::unimplemented(), updateSessions: r#impl::meta_service::updateSessions::unimplemented(), listSessions: r#impl::meta_service::listSessions::unimplemented(), getSession: r#impl::meta_service::getSession::unimplemented(), removeSession: r#impl::meta_service::removeSession::unimplemented(), + killQuery: r#impl::meta_service::killQuery::unimplemented(), reportTaskFinish: r#impl::meta_service::reportTaskFinish::unimplemented(), + listCluster: r#impl::meta_service::listCluster::unimplemented(), + getMetaDirInfo: r#impl::meta_service::getMetaDirInfo::unimplemented(), _marker: ::std::marker::PhantomData, } } @@ -35119,6 +37228,30 @@ pub mod mock { let closure: &mut dyn ::std::ops::FnMut(crate::types::ListFTClientsReq) -> _ = &mut **closure; ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) } + fn createFTIndex( + &self, + arg_req: &crate::types::CreateFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.createFTIndex.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::CreateFTIndexReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } + fn dropFTIndex( + &self, + arg_req: &crate::types::DropFTIndexReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.dropFTIndex.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::DropFTIndexReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } + fn listFTIndexes( + &self, + arg_req: &crate::types::ListFTIndexesReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.listFTIndexes.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::ListFTIndexesReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } fn createSession( &self, arg_req: &crate::types::CreateSessionReq, @@ -35130,7 +37263,7 @@ pub mod mock { fn updateSessions( &self, arg_req: &crate::types::UpdateSessionsReq, - ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { let mut closure = self.updateSessions.closure.lock().unwrap(); let closure: &mut dyn ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> _ = &mut **closure; ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) @@ -35159,6 +37292,14 @@ pub mod mock { let closure: &mut dyn ::std::ops::FnMut(crate::types::RemoveSessionReq) -> _ = &mut **closure; ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) } + fn killQuery( + &self, + arg_req: &crate::types::KillQueryReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.killQuery.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::KillQueryReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } fn reportTaskFinish( &self, arg_req: &crate::types::ReportTaskReq, @@ -35167,6 +37308,22 @@ pub mod mock { let closure: &mut dyn ::std::ops::FnMut(crate::types::ReportTaskReq) -> _ = &mut **closure; ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) } + fn listCluster( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.listCluster.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } + fn getMetaDirInfo( + &self, + arg_req: &crate::types::GetMetaDirInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.getMetaDirInfo.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::GetMetaDirInfoReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } } mod r#impl { @@ -38516,6 +40673,138 @@ pub mod mock { } } + pub struct createFTIndex<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::CreateFTIndexReq) -> ::std::result::Result< + crate::types::ExecResp, + crate::errors::meta_service::CreateFTIndexError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> createFTIndex<'mock> { + pub fn unimplemented() -> Self { + createFTIndex { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::CreateFTIndexReq| panic!( + "{}::{} is not mocked", + "MetaService", + "createFTIndex", + ))), + } + } + + pub fn ret(&self, value: crate::types::ExecResp) { + self.mock(move |_: crate::types::CreateFTIndexReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateFTIndexReq) -> crate::types::ExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::CreateFTIndexReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::CreateFTIndexReq| ::std::result::Result::Err(exception.clone().into())); + } + } + + pub struct dropFTIndex<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::DropFTIndexReq) -> ::std::result::Result< + crate::types::ExecResp, + crate::errors::meta_service::DropFTIndexError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> dropFTIndex<'mock> { + pub fn unimplemented() -> Self { + dropFTIndex { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::DropFTIndexReq| panic!( + "{}::{} is not mocked", + "MetaService", + "dropFTIndex", + ))), + } + } + + pub fn ret(&self, value: crate::types::ExecResp) { + self.mock(move |_: crate::types::DropFTIndexReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropFTIndexReq) -> crate::types::ExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::DropFTIndexReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::DropFTIndexReq| ::std::result::Result::Err(exception.clone().into())); + } + } + + pub struct listFTIndexes<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::ListFTIndexesReq) -> ::std::result::Result< + crate::types::ListFTIndexesResp, + crate::errors::meta_service::ListFTIndexesError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> listFTIndexes<'mock> { + pub fn unimplemented() -> Self { + listFTIndexes { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ListFTIndexesReq| panic!( + "{}::{} is not mocked", + "MetaService", + "listFTIndexes", + ))), + } + } + + pub fn ret(&self, value: crate::types::ListFTIndexesResp) { + self.mock(move |_: crate::types::ListFTIndexesReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListFTIndexesReq) -> crate::types::ListFTIndexesResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListFTIndexesReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::ListFTIndexesReq| ::std::result::Result::Err(exception.clone().into())); + } + } + pub struct createSession<'mock> { pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< dyn ::std::ops::FnMut(crate::types::CreateSessionReq) -> ::std::result::Result< @@ -38563,7 +40852,7 @@ pub mod mock { pub struct updateSessions<'mock> { pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< dyn ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> ::std::result::Result< - crate::types::ExecResp, + crate::types::UpdateSessionsResp, crate::errors::meta_service::UpdateSessionsError, > + ::std::marker::Send + ::std::marker::Sync + 'mock, >>, @@ -38580,16 +40869,16 @@ pub mod mock { } } - pub fn ret(&self, value: crate::types::ExecResp) { + pub fn ret(&self, value: crate::types::UpdateSessionsResp) { self.mock(move |_: crate::types::UpdateSessionsReq| value.clone()); } - pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> crate::types::ExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> crate::types::UpdateSessionsResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { let mut closure = self.closure.lock().unwrap(); *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); } - pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::UpdateSessionsReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { let mut closure = self.closure.lock().unwrap(); *closure = ::std::boxed::Box::new(move |req| mock(req)); } @@ -38736,6 +41025,50 @@ pub mod mock { } } + pub struct killQuery<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::KillQueryReq) -> ::std::result::Result< + crate::types::ExecResp, + crate::errors::meta_service::KillQueryError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> killQuery<'mock> { + pub fn unimplemented() -> Self { + killQuery { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::KillQueryReq| panic!( + "{}::{} is not mocked", + "MetaService", + "killQuery", + ))), + } + } + + pub fn ret(&self, value: crate::types::ExecResp) { + self.mock(move |_: crate::types::KillQueryReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::KillQueryReq) -> crate::types::ExecResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::KillQueryReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::KillQueryReq| ::std::result::Result::Err(exception.clone().into())); + } + } + pub struct reportTaskFinish<'mock> { pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< dyn ::std::ops::FnMut(crate::types::ReportTaskReq) -> ::std::result::Result< @@ -38779,6 +41112,94 @@ pub mod mock { *closure = ::std::boxed::Box::new(move |_: crate::types::ReportTaskReq| ::std::result::Result::Err(exception.clone().into())); } } + + pub struct listCluster<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result< + crate::types::ListClusterInfoResp, + crate::errors::meta_service::ListClusterError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> listCluster<'mock> { + pub fn unimplemented() -> Self { + listCluster { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ListClusterInfoReq| panic!( + "{}::{} is not mocked", + "MetaService", + "listCluster", + ))), + } + } + + pub fn ret(&self, value: crate::types::ListClusterInfoResp) { + self.mock(move |_: crate::types::ListClusterInfoReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> crate::types::ListClusterInfoResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::ListClusterInfoReq| ::std::result::Result::Err(exception.clone().into())); + } + } + + pub struct getMetaDirInfo<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::GetMetaDirInfoReq) -> ::std::result::Result< + crate::types::GetMetaDirInfoResp, + crate::errors::meta_service::GetMetaDirInfoError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> getMetaDirInfo<'mock> { + pub fn unimplemented() -> Self { + getMetaDirInfo { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::GetMetaDirInfoReq| panic!( + "{}::{} is not mocked", + "MetaService", + "getMetaDirInfo", + ))), + } + } + + pub fn ret(&self, value: crate::types::GetMetaDirInfoResp) { + self.mock(move |_: crate::types::GetMetaDirInfoReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetMetaDirInfoReq) -> crate::types::GetMetaDirInfoResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::GetMetaDirInfoReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::GetMetaDirInfoReq| ::std::result::Result::Err(exception.clone().into())); + } + } } } } @@ -38938,6 +41359,12 @@ pub mod errors { pub type ListFTClientsError = ::fbthrift::NonthrowingFunctionError; + pub type CreateFTIndexError = ::fbthrift::NonthrowingFunctionError; + + pub type DropFTIndexError = ::fbthrift::NonthrowingFunctionError; + + pub type ListFTIndexesError = ::fbthrift::NonthrowingFunctionError; + pub type CreateSessionError = ::fbthrift::NonthrowingFunctionError; pub type UpdateSessionsError = ::fbthrift::NonthrowingFunctionError; @@ -38948,8 +41375,14 @@ pub mod errors { pub type RemoveSessionError = ::fbthrift::NonthrowingFunctionError; + pub type KillQueryError = ::fbthrift::NonthrowingFunctionError; + pub type ReportTaskFinishError = ::fbthrift::NonthrowingFunctionError; + pub type ListClusterError = ::fbthrift::NonthrowingFunctionError; + + pub type GetMetaDirInfoError = ::fbthrift::NonthrowingFunctionError; + } } diff --git a/src/interface/storage/lib.rs b/src/interface/storage/lib.rs index 8a95468..1291143 100644 --- a/src/interface/storage/lib.rs +++ b/src/interface/storage/lib.rs @@ -12,7 +12,7 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct PartitionResult { - pub code: crate::types::ErrorCode, + pub code: common::types::ErrorCode, pub part_id: common::types::PartitionID, pub leader: ::std::option::Option, } @@ -413,20 +413,17 @@ pub mod types { #[derive(Clone, Debug, PartialEq)] pub struct CreateCPResp { pub result: crate::types::ResponseCommon, - pub path: ::std::vec::Vec<::std::primitive::u8>, + pub info: ::std::vec::Vec, } #[derive(Clone, Debug, PartialEq)] - pub struct PartitionInfoResp { + pub struct ListClusterInfoResp { pub result: crate::types::ResponseCommon, - pub backup_name: ::std::vec::Vec<::std::primitive::u8>, - pub partition_info: common::types::PartitionBackupInfo, + pub dir: common::types::DirInfo, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct PartitionInfoRequest { - pub space_id: common::types::GraphSpaceID, - pub backup_name: ::std::vec::Vec<::std::primitive::u8>, + pub struct ListClusterInfoReq { } #[derive(Clone, Debug, PartialEq)] @@ -476,386 +473,6 @@ pub mod types { pub value: ::std::vec::Vec<::std::primitive::u8>, } - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] - pub struct ErrorCode(pub ::std::primitive::i32); - - impl ErrorCode { - pub const SUCCEEDED: Self = ErrorCode(0i32); - pub const E_DISCONNECTED: Self = ErrorCode(-1i32); - pub const E_FAILED_TO_CONNECT: Self = ErrorCode(-2i32); - pub const E_RPC_FAILURE: Self = ErrorCode(-3i32); - pub const E_LEADER_CHANGED: Self = ErrorCode(-11i32); - pub const E_KEY_HAS_EXISTS: Self = ErrorCode(-12i32); - pub const E_SPACE_NOT_FOUND: Self = ErrorCode(-13i32); - pub const E_PART_NOT_FOUND: Self = ErrorCode(-14i32); - pub const E_KEY_NOT_FOUND: Self = ErrorCode(-15i32); - pub const E_CONSENSUS_ERROR: Self = ErrorCode(-16i32); - pub const E_DATA_TYPE_MISMATCH: Self = ErrorCode(-17i32); - pub const E_INVALID_FIELD_VALUE: Self = ErrorCode(-18i32); - pub const E_REBUILD_INDEX_FAILED: Self = ErrorCode(-19i32); - pub const E_INVALID_OPERATION: Self = ErrorCode(-20i32); - pub const E_NOT_NULLABLE: Self = ErrorCode(-21i32); - pub const E_FIELD_UNSET: Self = ErrorCode(-22i32); - pub const E_OUT_OF_RANGE: Self = ErrorCode(-23i32); - pub const E_ATOMIC_OP_FAILED: Self = ErrorCode(-24i32); - pub const E_DATA_CONFLICT_ERROR: Self = ErrorCode(-25i32); - pub const E_EDGE_PROP_NOT_FOUND: Self = ErrorCode(-31i32); - pub const E_TAG_PROP_NOT_FOUND: Self = ErrorCode(-32i32); - pub const E_IMPROPER_DATA_TYPE: Self = ErrorCode(-33i32); - pub const E_EDGE_NOT_FOUND: Self = ErrorCode(-34i32); - pub const E_TAG_NOT_FOUND: Self = ErrorCode(-35i32); - pub const E_INVALID_SPACEVIDLEN: Self = ErrorCode(-36i32); - pub const E_INDEX_NOT_FOUND: Self = ErrorCode(-37i32); - pub const E_INVALID_FILTER: Self = ErrorCode(-41i32); - pub const E_INVALID_UPDATER: Self = ErrorCode(-42i32); - pub const E_INVALID_STORE: Self = ErrorCode(-43i32); - pub const E_INVALID_PEER: Self = ErrorCode(-44i32); - pub const E_RETRY_EXHAUSTED: Self = ErrorCode(-45i32); - pub const E_TRANSFER_LEADER_FAILED: Self = ErrorCode(-46i32); - pub const E_INVALID_STAT_TYPE: Self = ErrorCode(-47i32); - pub const E_INVALID_VID: Self = ErrorCode(-48i32); - pub const E_NO_TRANSFORMED: Self = ErrorCode(-49i32); - pub const E_LOAD_META_FAILED: Self = ErrorCode(-51i32); - pub const E_FAILED_TO_CHECKPOINT: Self = ErrorCode(-60i32); - pub const E_CHECKPOINT_BLOCKED: Self = ErrorCode(-61i32); - pub const E_BACKUP_FAILED: Self = ErrorCode(-65i32); - pub const E_PARTIAL_RESULT: Self = ErrorCode(-71i32); - pub const E_FILTER_OUT: Self = ErrorCode(-81i32); - pub const E_INVALID_DATA: Self = ErrorCode(-82i32); - pub const E_MUTATE_EDGE_CONFLICT: Self = ErrorCode(-85i32); - pub const E_OUTDATED_LOCK: Self = ErrorCode(-86i32); - pub const E_INVALID_TASK_PARA: Self = ErrorCode(-90i32); - pub const E_USER_CANCEL: Self = ErrorCode(-99i32); - pub const E_UNKNOWN: Self = ErrorCode(-100i32); - } - - impl ::fbthrift::ThriftEnum for ErrorCode { - fn enumerate() -> &'static [(ErrorCode, &'static str)] { - &[ - (ErrorCode::SUCCEEDED, "SUCCEEDED"), - (ErrorCode::E_DISCONNECTED, "E_DISCONNECTED"), - (ErrorCode::E_FAILED_TO_CONNECT, "E_FAILED_TO_CONNECT"), - (ErrorCode::E_RPC_FAILURE, "E_RPC_FAILURE"), - (ErrorCode::E_LEADER_CHANGED, "E_LEADER_CHANGED"), - (ErrorCode::E_KEY_HAS_EXISTS, "E_KEY_HAS_EXISTS"), - (ErrorCode::E_SPACE_NOT_FOUND, "E_SPACE_NOT_FOUND"), - (ErrorCode::E_PART_NOT_FOUND, "E_PART_NOT_FOUND"), - (ErrorCode::E_KEY_NOT_FOUND, "E_KEY_NOT_FOUND"), - (ErrorCode::E_CONSENSUS_ERROR, "E_CONSENSUS_ERROR"), - (ErrorCode::E_DATA_TYPE_MISMATCH, "E_DATA_TYPE_MISMATCH"), - (ErrorCode::E_INVALID_FIELD_VALUE, "E_INVALID_FIELD_VALUE"), - (ErrorCode::E_REBUILD_INDEX_FAILED, "E_REBUILD_INDEX_FAILED"), - (ErrorCode::E_INVALID_OPERATION, "E_INVALID_OPERATION"), - (ErrorCode::E_NOT_NULLABLE, "E_NOT_NULLABLE"), - (ErrorCode::E_FIELD_UNSET, "E_FIELD_UNSET"), - (ErrorCode::E_OUT_OF_RANGE, "E_OUT_OF_RANGE"), - (ErrorCode::E_ATOMIC_OP_FAILED, "E_ATOMIC_OP_FAILED"), - (ErrorCode::E_DATA_CONFLICT_ERROR, "E_DATA_CONFLICT_ERROR"), - (ErrorCode::E_EDGE_PROP_NOT_FOUND, "E_EDGE_PROP_NOT_FOUND"), - (ErrorCode::E_TAG_PROP_NOT_FOUND, "E_TAG_PROP_NOT_FOUND"), - (ErrorCode::E_IMPROPER_DATA_TYPE, "E_IMPROPER_DATA_TYPE"), - (ErrorCode::E_EDGE_NOT_FOUND, "E_EDGE_NOT_FOUND"), - (ErrorCode::E_TAG_NOT_FOUND, "E_TAG_NOT_FOUND"), - (ErrorCode::E_INVALID_SPACEVIDLEN, "E_INVALID_SPACEVIDLEN"), - (ErrorCode::E_INDEX_NOT_FOUND, "E_INDEX_NOT_FOUND"), - (ErrorCode::E_INVALID_FILTER, "E_INVALID_FILTER"), - (ErrorCode::E_INVALID_UPDATER, "E_INVALID_UPDATER"), - (ErrorCode::E_INVALID_STORE, "E_INVALID_STORE"), - (ErrorCode::E_INVALID_PEER, "E_INVALID_PEER"), - (ErrorCode::E_RETRY_EXHAUSTED, "E_RETRY_EXHAUSTED"), - (ErrorCode::E_TRANSFER_LEADER_FAILED, "E_TRANSFER_LEADER_FAILED"), - (ErrorCode::E_INVALID_STAT_TYPE, "E_INVALID_STAT_TYPE"), - (ErrorCode::E_INVALID_VID, "E_INVALID_VID"), - (ErrorCode::E_NO_TRANSFORMED, "E_NO_TRANSFORMED"), - (ErrorCode::E_LOAD_META_FAILED, "E_LOAD_META_FAILED"), - (ErrorCode::E_FAILED_TO_CHECKPOINT, "E_FAILED_TO_CHECKPOINT"), - (ErrorCode::E_CHECKPOINT_BLOCKED, "E_CHECKPOINT_BLOCKED"), - (ErrorCode::E_BACKUP_FAILED, "E_BACKUP_FAILED"), - (ErrorCode::E_PARTIAL_RESULT, "E_PARTIAL_RESULT"), - (ErrorCode::E_FILTER_OUT, "E_FILTER_OUT"), - (ErrorCode::E_INVALID_DATA, "E_INVALID_DATA"), - (ErrorCode::E_MUTATE_EDGE_CONFLICT, "E_MUTATE_EDGE_CONFLICT"), - (ErrorCode::E_OUTDATED_LOCK, "E_OUTDATED_LOCK"), - (ErrorCode::E_INVALID_TASK_PARA, "E_INVALID_TASK_PARA"), - (ErrorCode::E_USER_CANCEL, "E_USER_CANCEL"), - (ErrorCode::E_UNKNOWN, "E_UNKNOWN"), - ] - } - - fn variants() -> &'static [&'static str] { - &[ - "SUCCEEDED", - "E_DISCONNECTED", - "E_FAILED_TO_CONNECT", - "E_RPC_FAILURE", - "E_LEADER_CHANGED", - "E_KEY_HAS_EXISTS", - "E_SPACE_NOT_FOUND", - "E_PART_NOT_FOUND", - "E_KEY_NOT_FOUND", - "E_CONSENSUS_ERROR", - "E_DATA_TYPE_MISMATCH", - "E_INVALID_FIELD_VALUE", - "E_REBUILD_INDEX_FAILED", - "E_INVALID_OPERATION", - "E_NOT_NULLABLE", - "E_FIELD_UNSET", - "E_OUT_OF_RANGE", - "E_ATOMIC_OP_FAILED", - "E_DATA_CONFLICT_ERROR", - "E_EDGE_PROP_NOT_FOUND", - "E_TAG_PROP_NOT_FOUND", - "E_IMPROPER_DATA_TYPE", - "E_EDGE_NOT_FOUND", - "E_TAG_NOT_FOUND", - "E_INVALID_SPACEVIDLEN", - "E_INDEX_NOT_FOUND", - "E_INVALID_FILTER", - "E_INVALID_UPDATER", - "E_INVALID_STORE", - "E_INVALID_PEER", - "E_RETRY_EXHAUSTED", - "E_TRANSFER_LEADER_FAILED", - "E_INVALID_STAT_TYPE", - "E_INVALID_VID", - "E_NO_TRANSFORMED", - "E_LOAD_META_FAILED", - "E_FAILED_TO_CHECKPOINT", - "E_CHECKPOINT_BLOCKED", - "E_BACKUP_FAILED", - "E_PARTIAL_RESULT", - "E_FILTER_OUT", - "E_INVALID_DATA", - "E_MUTATE_EDGE_CONFLICT", - "E_OUTDATED_LOCK", - "E_INVALID_TASK_PARA", - "E_USER_CANCEL", - "E_UNKNOWN", - ] - } - - fn variant_values() -> &'static [ErrorCode] { - &[ - ErrorCode::SUCCEEDED, - ErrorCode::E_DISCONNECTED, - ErrorCode::E_FAILED_TO_CONNECT, - ErrorCode::E_RPC_FAILURE, - ErrorCode::E_LEADER_CHANGED, - ErrorCode::E_KEY_HAS_EXISTS, - ErrorCode::E_SPACE_NOT_FOUND, - ErrorCode::E_PART_NOT_FOUND, - ErrorCode::E_KEY_NOT_FOUND, - ErrorCode::E_CONSENSUS_ERROR, - ErrorCode::E_DATA_TYPE_MISMATCH, - ErrorCode::E_INVALID_FIELD_VALUE, - ErrorCode::E_REBUILD_INDEX_FAILED, - ErrorCode::E_INVALID_OPERATION, - ErrorCode::E_NOT_NULLABLE, - ErrorCode::E_FIELD_UNSET, - ErrorCode::E_OUT_OF_RANGE, - ErrorCode::E_ATOMIC_OP_FAILED, - ErrorCode::E_DATA_CONFLICT_ERROR, - ErrorCode::E_EDGE_PROP_NOT_FOUND, - ErrorCode::E_TAG_PROP_NOT_FOUND, - ErrorCode::E_IMPROPER_DATA_TYPE, - ErrorCode::E_EDGE_NOT_FOUND, - ErrorCode::E_TAG_NOT_FOUND, - ErrorCode::E_INVALID_SPACEVIDLEN, - ErrorCode::E_INDEX_NOT_FOUND, - ErrorCode::E_INVALID_FILTER, - ErrorCode::E_INVALID_UPDATER, - ErrorCode::E_INVALID_STORE, - ErrorCode::E_INVALID_PEER, - ErrorCode::E_RETRY_EXHAUSTED, - ErrorCode::E_TRANSFER_LEADER_FAILED, - ErrorCode::E_INVALID_STAT_TYPE, - ErrorCode::E_INVALID_VID, - ErrorCode::E_NO_TRANSFORMED, - ErrorCode::E_LOAD_META_FAILED, - ErrorCode::E_FAILED_TO_CHECKPOINT, - ErrorCode::E_CHECKPOINT_BLOCKED, - ErrorCode::E_BACKUP_FAILED, - ErrorCode::E_PARTIAL_RESULT, - ErrorCode::E_FILTER_OUT, - ErrorCode::E_INVALID_DATA, - ErrorCode::E_MUTATE_EDGE_CONFLICT, - ErrorCode::E_OUTDATED_LOCK, - ErrorCode::E_INVALID_TASK_PARA, - ErrorCode::E_USER_CANCEL, - ErrorCode::E_UNKNOWN, - ] - } - } - - impl ::std::default::Default for ErrorCode { - fn default() -> Self { - ErrorCode(::fbthrift::__UNKNOWN_ID) - } - } - - impl<'a> ::std::convert::From<&'a ErrorCode> for ::std::primitive::i32 { - #[inline] - fn from(x: &'a ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From for ::std::primitive::i32 { - #[inline] - fn from(x: ErrorCode) -> Self { - x.0 - } - } - - impl ::std::convert::From<::std::primitive::i32> for ErrorCode { - #[inline] - fn from(x: ::std::primitive::i32) -> Self { - Self(x) - } - } - - impl ::std::fmt::Display for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - static VARIANTS_BY_NUMBER: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_UNKNOWN", -100), - ("E_USER_CANCEL", -99), - ("E_INVALID_TASK_PARA", -90), - ("E_OUTDATED_LOCK", -86), - ("E_MUTATE_EDGE_CONFLICT", -85), - ("E_INVALID_DATA", -82), - ("E_FILTER_OUT", -81), - ("E_PARTIAL_RESULT", -71), - ("E_BACKUP_FAILED", -65), - ("E_CHECKPOINT_BLOCKED", -61), - ("E_FAILED_TO_CHECKPOINT", -60), - ("E_LOAD_META_FAILED", -51), - ("E_NO_TRANSFORMED", -49), - ("E_INVALID_VID", -48), - ("E_INVALID_STAT_TYPE", -47), - ("E_TRANSFER_LEADER_FAILED", -46), - ("E_RETRY_EXHAUSTED", -45), - ("E_INVALID_PEER", -44), - ("E_INVALID_STORE", -43), - ("E_INVALID_UPDATER", -42), - ("E_INVALID_FILTER", -41), - ("E_INDEX_NOT_FOUND", -37), - ("E_INVALID_SPACEVIDLEN", -36), - ("E_TAG_NOT_FOUND", -35), - ("E_EDGE_NOT_FOUND", -34), - ("E_IMPROPER_DATA_TYPE", -33), - ("E_TAG_PROP_NOT_FOUND", -32), - ("E_EDGE_PROP_NOT_FOUND", -31), - ("E_DATA_CONFLICT_ERROR", -25), - ("E_ATOMIC_OP_FAILED", -24), - ("E_OUT_OF_RANGE", -23), - ("E_FIELD_UNSET", -22), - ("E_NOT_NULLABLE", -21), - ("E_INVALID_OPERATION", -20), - ("E_REBUILD_INDEX_FAILED", -19), - ("E_INVALID_FIELD_VALUE", -18), - ("E_DATA_TYPE_MISMATCH", -17), - ("E_CONSENSUS_ERROR", -16), - ("E_KEY_NOT_FOUND", -15), - ("E_PART_NOT_FOUND", -14), - ("E_SPACE_NOT_FOUND", -13), - ("E_KEY_HAS_EXISTS", -12), - ("E_LEADER_CHANGED", -11), - ("E_RPC_FAILURE", -3), - ("E_FAILED_TO_CONNECT", -2), - ("E_DISCONNECTED", -1), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_display(VARIANTS_BY_NUMBER, fmt, self.0) - } - } - - impl ::std::fmt::Debug for ErrorCode { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(fmt, "ErrorCode::{}", self) - } - } - - impl ::std::str::FromStr for ErrorCode { - type Err = ::anyhow::Error; - - fn from_str(string: &::std::primitive::str) -> ::std::result::Result { - static VARIANTS_BY_NAME: &[(&::std::primitive::str, ::std::primitive::i32)] = &[ - ("E_ATOMIC_OP_FAILED", -24), - ("E_BACKUP_FAILED", -65), - ("E_CHECKPOINT_BLOCKED", -61), - ("E_CONSENSUS_ERROR", -16), - ("E_DATA_CONFLICT_ERROR", -25), - ("E_DATA_TYPE_MISMATCH", -17), - ("E_DISCONNECTED", -1), - ("E_EDGE_NOT_FOUND", -34), - ("E_EDGE_PROP_NOT_FOUND", -31), - ("E_FAILED_TO_CHECKPOINT", -60), - ("E_FAILED_TO_CONNECT", -2), - ("E_FIELD_UNSET", -22), - ("E_FILTER_OUT", -81), - ("E_IMPROPER_DATA_TYPE", -33), - ("E_INDEX_NOT_FOUND", -37), - ("E_INVALID_DATA", -82), - ("E_INVALID_FIELD_VALUE", -18), - ("E_INVALID_FILTER", -41), - ("E_INVALID_OPERATION", -20), - ("E_INVALID_PEER", -44), - ("E_INVALID_SPACEVIDLEN", -36), - ("E_INVALID_STAT_TYPE", -47), - ("E_INVALID_STORE", -43), - ("E_INVALID_TASK_PARA", -90), - ("E_INVALID_UPDATER", -42), - ("E_INVALID_VID", -48), - ("E_KEY_HAS_EXISTS", -12), - ("E_KEY_NOT_FOUND", -15), - ("E_LEADER_CHANGED", -11), - ("E_LOAD_META_FAILED", -51), - ("E_MUTATE_EDGE_CONFLICT", -85), - ("E_NOT_NULLABLE", -21), - ("E_NO_TRANSFORMED", -49), - ("E_OUTDATED_LOCK", -86), - ("E_OUT_OF_RANGE", -23), - ("E_PARTIAL_RESULT", -71), - ("E_PART_NOT_FOUND", -14), - ("E_REBUILD_INDEX_FAILED", -19), - ("E_RETRY_EXHAUSTED", -45), - ("E_RPC_FAILURE", -3), - ("E_SPACE_NOT_FOUND", -13), - ("E_TAG_NOT_FOUND", -35), - ("E_TAG_PROP_NOT_FOUND", -32), - ("E_TRANSFER_LEADER_FAILED", -46), - ("E_UNKNOWN", -100), - ("E_USER_CANCEL", -99), - ("SUCCEEDED", 0), - ]; - ::fbthrift::help::enum_from_str(VARIANTS_BY_NAME, string, "ErrorCode").map(ErrorCode) - } - } - - impl ::fbthrift::GetTType for ErrorCode { - const TTYPE: ::fbthrift::TType = ::fbthrift::TType::I32; - } - - impl

::fbthrift::Serialize

for ErrorCode - where - P: ::fbthrift::ProtocolWriter, - { - #[inline] - fn write(&self, p: &mut P) { - p.write_i32(self.into()) - } - } - - impl

::fbthrift::Deserialize

for ErrorCode - where - P: ::fbthrift::ProtocolReader, - { - #[inline] - fn read(p: &mut P) -> ::anyhow::Result { - ::std::result::Result::Ok(ErrorCode::from(p.read_i32()?)) - } - } - #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct StatType(pub ::std::primitive::i32); @@ -5578,7 +5195,7 @@ pub mod types { fn default() -> Self { Self { result: ::std::default::Default::default(), - path: ::std::default::Default::default(), + info: ::std::default::Default::default(), } } } @@ -5599,8 +5216,8 @@ pub mod types { p.write_field_begin("result", ::fbthrift::TType::Struct, 1); ::fbthrift::Serialize::write(&self.result, p); p.write_field_end(); - p.write_field_begin("path", ::fbthrift::TType::String, 2); - ::fbthrift::Serialize::write(&self.path, p); + p.write_field_begin("info", ::fbthrift::TType::List, 2); + ::fbthrift::Serialize::write(&self.info, p); p.write_field_end(); p.write_field_stop(); p.write_struct_end(); @@ -5613,18 +5230,18 @@ pub mod types { { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("path", ::fbthrift::TType::String, 2), + ::fbthrift::Field::new("info", ::fbthrift::TType::List, 2), ::fbthrift::Field::new("result", ::fbthrift::TType::Struct, 1), ]; let mut field_result = ::std::option::Option::None; - let mut field_path = ::std::option::Option::None; + let mut field_info = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::Struct, 1) => field_result = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::String, 2) => field_path = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::List, 2) => field_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -5632,70 +5249,63 @@ pub mod types { p.read_struct_end()?; ::std::result::Result::Ok(Self { result: field_result.unwrap_or_default(), - path: field_path.unwrap_or_default(), + info: field_info.unwrap_or_default(), }) } } - impl ::std::default::Default for self::PartitionInfoResp { + impl ::std::default::Default for self::ListClusterInfoResp { fn default() -> Self { Self { result: ::std::default::Default::default(), - backup_name: ::std::default::Default::default(), - partition_info: ::std::default::Default::default(), + dir: ::std::default::Default::default(), } } } - unsafe impl ::std::marker::Send for self::PartitionInfoResp {} - unsafe impl ::std::marker::Sync for self::PartitionInfoResp {} + unsafe impl ::std::marker::Send for self::ListClusterInfoResp {} + unsafe impl ::std::marker::Sync for self::ListClusterInfoResp {} - impl ::fbthrift::GetTType for self::PartitionInfoResp { + impl ::fbthrift::GetTType for self::ListClusterInfoResp { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } - impl

::fbthrift::Serialize

for self::PartitionInfoResp + impl

::fbthrift::Serialize

for self::ListClusterInfoResp where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { - p.write_struct_begin("PartitionInfoResp"); + p.write_struct_begin("ListClusterInfoResp"); p.write_field_begin("result", ::fbthrift::TType::Struct, 1); ::fbthrift::Serialize::write(&self.result, p); p.write_field_end(); - p.write_field_begin("backup_name", ::fbthrift::TType::String, 2); - ::fbthrift::Serialize::write(&self.backup_name, p); - p.write_field_end(); - p.write_field_begin("partition_info", ::fbthrift::TType::Struct, 3); - ::fbthrift::Serialize::write(&self.partition_info, p); + p.write_field_begin("dir", ::fbthrift::TType::Struct, 2); + ::fbthrift::Serialize::write(&self.dir, p); p.write_field_end(); p.write_field_stop(); p.write_struct_end(); } } - impl

::fbthrift::Deserialize

for self::PartitionInfoResp + impl

::fbthrift::Deserialize

for self::ListClusterInfoResp where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("backup_name", ::fbthrift::TType::String, 2), - ::fbthrift::Field::new("partition_info", ::fbthrift::TType::Struct, 3), + ::fbthrift::Field::new("dir", ::fbthrift::TType::Struct, 2), ::fbthrift::Field::new("result", ::fbthrift::TType::Struct, 1), ]; let mut field_result = ::std::option::Option::None; - let mut field_backup_name = ::std::option::Option::None; - let mut field_partition_info = ::std::option::Option::None; + let mut field_dir = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::Struct, 1) => field_result = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::String, 2) => field_backup_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, 3) => field_partition_info = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, 2) => field_dir = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; @@ -5703,72 +5313,55 @@ pub mod types { p.read_struct_end()?; ::std::result::Result::Ok(Self { result: field_result.unwrap_or_default(), - backup_name: field_backup_name.unwrap_or_default(), - partition_info: field_partition_info.unwrap_or_default(), + dir: field_dir.unwrap_or_default(), }) } } - impl ::std::default::Default for self::PartitionInfoRequest { + impl ::std::default::Default for self::ListClusterInfoReq { fn default() -> Self { Self { - space_id: ::std::default::Default::default(), - backup_name: ::std::default::Default::default(), } } } - unsafe impl ::std::marker::Send for self::PartitionInfoRequest {} - unsafe impl ::std::marker::Sync for self::PartitionInfoRequest {} + unsafe impl ::std::marker::Send for self::ListClusterInfoReq {} + unsafe impl ::std::marker::Sync for self::ListClusterInfoReq {} - impl ::fbthrift::GetTType for self::PartitionInfoRequest { + impl ::fbthrift::GetTType for self::ListClusterInfoReq { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } - impl

::fbthrift::Serialize

for self::PartitionInfoRequest + impl

::fbthrift::Serialize

for self::ListClusterInfoReq where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { - p.write_struct_begin("PartitionInfoRequest"); - p.write_field_begin("space_id", ::fbthrift::TType::I32, 1); - ::fbthrift::Serialize::write(&self.space_id, p); - p.write_field_end(); - p.write_field_begin("backup_name", ::fbthrift::TType::String, 2); - ::fbthrift::Serialize::write(&self.backup_name, p); - p.write_field_end(); + p.write_struct_begin("ListClusterInfoReq"); p.write_field_stop(); p.write_struct_end(); } } - impl

::fbthrift::Deserialize

for self::PartitionInfoRequest + impl

::fbthrift::Deserialize

for self::ListClusterInfoReq where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("backup_name", ::fbthrift::TType::String, 2), - ::fbthrift::Field::new("space_id", ::fbthrift::TType::I32, 1), ]; - let mut field_space_id = ::std::option::Option::None; - let mut field_backup_name = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, - (::fbthrift::TType::I32, 1) => field_space_id = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::String, 2) => field_backup_name = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; } p.read_struct_end()?; ::std::result::Result::Ok(Self { - space_id: field_space_id.unwrap_or_default(), - backup_name: field_backup_name.unwrap_or_default(), }) } } @@ -8912,6 +8505,97 @@ pub mod services { ) } } + + #[derive(Clone, Debug)] + pub enum ListClusterInfoExn { + Success(crate::types::ListClusterInfoResp), + ApplicationException(::fbthrift::ApplicationException), + } + + impl ::std::convert::From<::fbthrift::ApplicationException> for ListClusterInfoExn { + fn from(exn: ::fbthrift::ApplicationException) -> Self { + ListClusterInfoExn::ApplicationException(exn) + } + } + + impl ::fbthrift::GetTType for ListClusterInfoExn { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; + } + + impl

::fbthrift::Serialize

for ListClusterInfoExn + where + P: ::fbthrift::ProtocolWriter, + { + fn write(&self, p: &mut P) { + p.write_struct_begin("ListClusterInfo"); + match self { + ListClusterInfoExn::Success(inner) => { + p.write_field_begin( + "Success", + ::fbthrift::TType::Struct, + 0i16, + ); + inner.write(p); + p.write_field_end(); + } + ListClusterInfoExn::ApplicationException(_) => panic!( + "Bad union Alt field {} id {}", + "ApplicationException", + -2147483648i32, + ), + } + p.write_field_stop(); + p.write_struct_end(); + } + } + + impl

::fbthrift::Deserialize

for ListClusterInfoExn + where + P: ::fbthrift::ProtocolReader, + { + fn read(p: &mut P) -> ::anyhow::Result { + static RETURNS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("Success", ::fbthrift::TType::Struct, 0), + ]; + let _ = p.read_struct_begin(|_| ())?; + let mut once = false; + let mut alt = ::std::option::Option::None; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), RETURNS)?; + match ((fty, fid as ::std::primitive::i32), once) { + ((::fbthrift::TType::Stop, _), _) => { + p.read_field_end()?; + break; + } + ((::fbthrift::TType::Struct, 0i32), false) => { + once = true; + alt = ::std::option::Option::Some(ListClusterInfoExn::Success(::fbthrift::Deserialize::read(p)?)); + } + ((ty, _id), false) => p.skip(ty)?, + ((badty, badid), true) => return ::std::result::Result::Err(::std::convert::From::from( + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::ProtocolError, + format!( + "unwanted extra union {} field ty {:?} id {}", + "ListClusterInfoExn", + badty, + badid, + ), + ) + )), + } + p.read_field_end()?; + } + p.read_struct_end()?; + alt.ok_or_else(|| + ::fbthrift::ApplicationException::new( + ::fbthrift::ApplicationExceptionErrorCode::MissingResult, + format!("Empty union {}", "ListClusterInfoExn"), + ) + .into(), + ) + } + } } pub mod general_storage_service { @@ -10491,6 +10175,10 @@ pub mod client { &self, arg_req: &crate::types::StopAdminTaskRequest, ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; + fn listClusterInfo( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>>; } impl StorageAdminService for StorageAdminServiceImpl @@ -11339,6 +11027,62 @@ pub mod client { })) .boxed() } + fn listClusterInfo( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + use ::fbthrift::{ProtocolReader as _, ProtocolWriter as _}; + use ::futures::future::{FutureExt as _, TryFutureExt as _}; + let request = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "listClusterInfo", + ::fbthrift::MessageType::Call, + // Note: we send a 0 message sequence ID from clients because + // this field should not be used by the server (except for some + // language implementations). + 0, + |p| { + p.write_struct_begin("args"); + p.write_field_begin("arg_req", ::fbthrift::TType::Struct, 1i16); + ::fbthrift::Serialize::write(&arg_req, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + }, + )); + self.transport() + .call(request) + .map_err(::std::convert::From::from) + .and_then(|reply| ::futures::future::ready({ + let de = P::deserializer(reply); + move |mut p: P::Deserializer| -> ::std::result::Result { + let p = &mut p; + let (_, message_type, _) = p.read_message_begin(|_| ())?; + let result = match message_type { + ::fbthrift::MessageType::Reply => { + let exn: crate::services::storage_admin_service::ListClusterInfoExn = ::fbthrift::Deserialize::read(p)?; + match exn { + crate::services::storage_admin_service::ListClusterInfoExn::Success(x) => ::std::result::Result::Ok(x), + crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException(ae) => { + ::std::result::Result::Err(crate::errors::storage_admin_service::ListClusterInfoError::ApplicationException(ae)) + } + } + } + ::fbthrift::MessageType::Exception => { + let ae: ::fbthrift::ApplicationException = ::fbthrift::Deserialize::read(p)?; + ::std::result::Result::Err(crate::errors::storage_admin_service::ListClusterInfoError::ApplicationException(ae)) + } + ::fbthrift::MessageType::Call | ::fbthrift::MessageType::Oneway | ::fbthrift::MessageType::InvalidMessageType => { + let err = ::anyhow::anyhow!("Unexpected message type {:?}", message_type); + ::std::result::Result::Err(crate::errors::storage_admin_service::ListClusterInfoError::ThriftError(err)) + } + }; + p.read_message_end()?; + result + }(de) + })) + .boxed() + } } impl<'a, T> StorageAdminService for T @@ -11466,6 +11210,14 @@ pub mod client { arg_req, ) } + fn listClusterInfo( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + self.as_ref().listClusterInfo( + arg_req, + ) + } } pub struct make_StorageAdminService; @@ -13486,6 +13238,17 @@ pub mod server { ), )) } + async fn listClusterInfo( + &self, + _req: crate::types::ListClusterInfoReq, + ) -> ::std::result::Result { + ::std::result::Result::Err(crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException( + ::fbthrift::ApplicationException::unimplemented_method( + "StorageAdminService", + "listClusterInfo", + ), + )) + } } #[derive(Clone, Debug)] @@ -14564,6 +14327,76 @@ pub mod server { ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; ::std::result::Result::Ok(res) } + + async fn handle_listClusterInfo<'a>( + &'a self, + p: &'a mut P::Deserializer, + req_ctxt: &R, + seqid: ::std::primitive::u32, + ) -> ::anyhow::Result<::fbthrift::ProtocolEncodedFinal

> { + use ::const_cstr::const_cstr; + use ::fbthrift::ProtocolReader as _; + + const_cstr! { + SERVICE_NAME = "StorageAdminService"; + METHOD_NAME = "StorageAdminService.listClusterInfo"; + } + let mut ctx_stack = req_ctxt.get_context_stack( + &SERVICE_NAME, + &METHOD_NAME, + )?; + ::fbthrift::ContextStack::pre_read(&mut ctx_stack)?; + + static ARGS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("req", ::fbthrift::TType::Struct, 1), + ]; + let mut field_req = ::std::option::Option::None; + + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), ARGS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, 1) => field_req = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::fbthrift::ContextStack::post_read(&mut ctx_stack, 0)?; + let res = self.service.listClusterInfo( + field_req.ok_or_else(|| { + ::fbthrift::ApplicationException::missing_arg( + "listClusterInfo", + "req", + ) + })?, + ).await; + let res = match res { + ::std::result::Result::Ok(res) => { + crate::services::storage_admin_service::ListClusterInfoExn::Success(res) + } + ::std::result::Result::Err(crate::services::storage_admin_service::ListClusterInfoExn::ApplicationException(aexn)) => { + return ::std::result::Result::Err(aexn.into()) + } + ::std::result::Result::Err(crate::services::storage_admin_service::ListClusterInfoExn::Success(_)) => { + panic!( + "{} attempted to return success via error", + "listClusterInfo", + ) + } + }; + ::fbthrift::ContextStack::pre_write(&mut ctx_stack)?; + let res = ::fbthrift::serialize!(P, |p| ::fbthrift::protocol::write_message( + p, + "listClusterInfo", + ::fbthrift::MessageType::Reply, + seqid, + |p| ::fbthrift::Serialize::write(&res, p), + )); + ::fbthrift::ContextStack::post_write(&mut ctx_stack, 0)?; + ::std::result::Result::Ok(res) + } } #[::async_trait::async_trait] @@ -14595,6 +14428,7 @@ pub mod server { b"checkPeers" => ::std::result::Result::Ok(12usize), b"addAdminTask" => ::std::result::Result::Ok(13usize), b"stopAdminTask" => ::std::result::Result::Ok(14usize), + b"listClusterInfo" => ::std::result::Result::Ok(15usize), _ => ::std::result::Result::Err(::fbthrift::ApplicationException::unknown_method()), } } @@ -14622,6 +14456,7 @@ pub mod server { 12usize => self.handle_checkPeers(_p, _r, _seqid).await, 13usize => self.handle_addAdminTask(_p, _r, _seqid).await, 14usize => self.handle_stopAdminTask(_p, _r, _seqid).await, + 15usize => self.handle_listClusterInfo(_p, _r, _seqid).await, bad => panic!( "{}: unexpected method idx {}", "StorageAdminServiceProcessor", @@ -15680,6 +15515,7 @@ pub mod mock { pub checkPeers: r#impl::storage_admin_service::checkPeers<'mock>, pub addAdminTask: r#impl::storage_admin_service::addAdminTask<'mock>, pub stopAdminTask: r#impl::storage_admin_service::stopAdminTask<'mock>, + pub listClusterInfo: r#impl::storage_admin_service::listClusterInfo<'mock>, _marker: ::std::marker::PhantomData<&'mock ()>, } @@ -15701,6 +15537,7 @@ pub mod mock { checkPeers: r#impl::storage_admin_service::checkPeers::unimplemented(), addAdminTask: r#impl::storage_admin_service::addAdminTask::unimplemented(), stopAdminTask: r#impl::storage_admin_service::stopAdminTask::unimplemented(), + listClusterInfo: r#impl::storage_admin_service::listClusterInfo::unimplemented(), _marker: ::std::marker::PhantomData, } } @@ -15828,6 +15665,14 @@ pub mod mock { let closure: &mut dyn ::std::ops::FnMut(crate::types::StopAdminTaskRequest) -> _ = &mut **closure; ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) } + fn listClusterInfo( + &self, + arg_req: &crate::types::ListClusterInfoReq, + ) -> ::std::pin::Pin<::std::boxed::Box> + ::std::marker::Send + 'static>> { + let mut closure = self.listClusterInfo.closure.lock().unwrap(); + let closure: &mut dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> _ = &mut **closure; + ::std::boxed::Box::pin(::futures::future::ready(closure(arg_req.clone()))) + } } @@ -17194,6 +17039,50 @@ pub mod mock { *closure = ::std::boxed::Box::new(move |_: crate::types::StopAdminTaskRequest| ::std::result::Result::Err(exception.clone().into())); } } + + pub struct listClusterInfo<'mock> { + pub(crate) closure: ::std::sync::Mutex<::std::boxed::Box< + dyn ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result< + crate::types::ListClusterInfoResp, + crate::errors::storage_admin_service::ListClusterInfoError, + > + ::std::marker::Send + ::std::marker::Sync + 'mock, + >>, + } + + impl<'mock> listClusterInfo<'mock> { + pub fn unimplemented() -> Self { + listClusterInfo { + closure: ::std::sync::Mutex::new(::std::boxed::Box::new(|_: crate::types::ListClusterInfoReq| panic!( + "{}::{} is not mocked", + "StorageAdminService", + "listClusterInfo", + ))), + } + } + + pub fn ret(&self, value: crate::types::ListClusterInfoResp) { + self.mock(move |_: crate::types::ListClusterInfoReq| value.clone()); + } + + pub fn mock(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> crate::types::ListClusterInfoResp + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| ::std::result::Result::Ok(mock(req))); + } + + pub fn mock_result(&self, mut mock: impl ::std::ops::FnMut(crate::types::ListClusterInfoReq) -> ::std::result::Result + ::std::marker::Send + ::std::marker::Sync + 'mock) { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |req| mock(req)); + } + + pub fn throw(&self, exception: E) + where + E: ::std::convert::Into, + E: ::std::clone::Clone + ::std::marker::Send + ::std::marker::Sync + 'mock, + { + let mut closure = self.closure.lock().unwrap(); + *closure = ::std::boxed::Box::new(move |_: crate::types::ListClusterInfoReq| ::std::result::Result::Err(exception.clone().into())); + } + } } pub mod general_storage_service { @@ -17487,6 +17376,8 @@ pub mod errors { pub type StopAdminTaskError = ::fbthrift::NonthrowingFunctionError; + pub type ListClusterInfoError = ::fbthrift::NonthrowingFunctionError; + } pub mod general_storage_service {