summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
Diffstat (limited to 'priv')
-rw-r--r--priv/schema/rabbit.schema61
1 files changed, 61 insertions, 0 deletions
diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema
index 8c951cbecb..8db2ebf3ff 100644
--- a/priv/schema/rabbit.schema
+++ b/priv/schema/rabbit.schema
@@ -1522,6 +1522,67 @@ end}.
end
}.
+%%
+%% Ra
+%%
+
+{mapping, "raft.segment_max_entries", "ra.segment_max_entries", [
+ {datatype, integer},
+ {validators, ["non_zero_positive_integer"]}
+]}.
+
+{translation, "ra.segment_max_entries",
+ fun(Conf) ->
+ case cuttlefish:conf_get("raft.segment_max_entries", Conf, undefined) of
+ undefined -> cuttlefish:unset();
+ Val -> Val
+ end
+ end
+}.
+
+{mapping, "raft.wal_max_size_bytes", "ra.wal_max_size_bytes", [
+ {datatype, integer},
+ {validators, ["non_zero_positive_integer"]}
+]}.
+
+{translation, "ra.wal_max_size_bytes",
+ fun(Conf) ->
+ case cuttlefish:conf_get("raft.wal_max_size_bytes", Conf, undefined) of
+ undefined -> cuttlefish:unset();
+ Val -> Val
+ end
+ end
+}.
+
+{mapping, "raft.wal_max_batch_size", "ra.wal_max_batch_size", [
+ {datatype, integer},
+ {validators, ["non_zero_positive_integer"]}
+]}.
+
+{translation, "ra.wal_max_batch_size",
+ fun(Conf) ->
+ case cuttlefish:conf_get("raft.wal_max_batch_size", Conf, undefined) of
+ undefined -> cuttlefish:unset();
+ Val -> Val
+ end
+ end
+}.
+
+{mapping, "raft.snapshot_chunk_size", "ra.snapshot_chunk_size", [
+ {datatype, integer},
+ {validators, ["non_zero_positive_integer"]}
+]}.
+
+{translation, "ra.snapshot_chunk_size",
+ fun(Conf) ->
+ case cuttlefish:conf_get("raft.snapshot_chunk_size", Conf, undefined) of
+ undefined -> cuttlefish:unset();
+ Val -> Val
+ end
+ end
+}.
+
+
% ===============================
% Validators
% ===============================