Skip to main content

NodeConfig

Struct NodeConfig 

Source
pub struct NodeConfig {
Show 15 fields pub store: StoreSpec, pub data_dir: PathBuf, pub owner: String, pub lease_ttl_ms: i64, pub lease_wait_ms: i64, pub ha: bool, pub advertise: Option<String>, pub index_interval: Duration, pub index_backoff: u32, pub index_tail_threshold: u64, pub index_tail_deadline: Duration, pub heartbeat_interval: Duration, pub gc_interval: Option<Duration>, pub gc_retention: Duration, pub tx_fn_expander: Option<Arc<dyn TxFnExpander>>,
}
Expand description

Node process configuration.

Fields§

§store: StoreSpec

Storage-service backend for blobs and roots (mem, fs, or Turso).

§data_dir: PathBuf

Data directory holding the filesystem blob/root store (for the fs backend) and the transaction logs (for every non-mem backend).

§owner: String

Stable owner identity for lease records.

§lease_ttl_ms: i64

Lease time-to-live in milliseconds.

§lease_wait_ms: i64

How long to wait for a held lease to expire before giving up.

§ha: bool

High-availability mode: when another owner holds a database’s lease, stand by and take over on expiry instead of failing startup, and on depose return to standby instead of shutting the process down.

§advertise: Option<String>

Client endpoint advertised in the lease for peer lease-holder rediscovery (e.g. http://transactor-a:4334).

§index_interval: Duration

Interval between background index publications.

§index_backoff: u32

Minimum wait before the next index publication, as a multiple of the previous publication’s duration. Publications currently rewrite every index in full, so this stretches the effective interval as the database grows, bounding the share of time and storage bandwidth spent republishing to at most 1/(1+n); 0 disables the backoff.

§index_tail_threshold: u64

Pending log-tail growth (recorded datoms) below which a due publication is deferred, so trickle writes coalesce instead of rewriting every index; 0 publishes any pending work.

§index_tail_deadline: Duration

Longest a pending below-threshold tail may defer publication.

§heartbeat_interval: Duration

Interval between heartbeats on subscription streams.

§gc_interval: Option<Duration>

Interval between scheduled garbage-collection duties; None disables it.

§gc_retention: Duration

Minimum age of an unreachable blob before scheduled/manual online GC.

§tx_fn_expander: Option<Arc<dyn TxFnExpander>>

Optional database-function expander (:db/fn support).

Implementations§

Source§

impl NodeConfig

Source

pub fn new(data_dir: PathBuf) -> Self

Sensible defaults for a data directory.

Trait Implementations§

Source§

impl Clone for NodeConfig

Source§

fn clone(&self) -> NodeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more