Skip to main content

Crate taceo_nodes_common

Crate taceo_nodes_common 

Source
Expand description

Common utilities for MPC-node services.

This crate provides building blocks shared across nodes in the MPC network.

  • Environment – represents the deployment environment (prod / staging / test).
  • StartedServices – tracks whether all async background services have started, used to drive the /health endpoint.
  • spawn_shutdown_task / default_shutdown_signal – wiring for graceful shutdown via CTRL+C or SIGTERM.
  • version_info! – macro that returns a version string containing the crate name, semver version, and git hash.

§Optional Features

Re-exports§

pub use git_version;

Modules§

api
Health Check Endpoints
middleware
Axum middleware layers.
postgres
Configuration for a Postgres database.
test_utils
Utilities for testing nodes.
web3
HTTP RPC provider utilities for interacting with Ethereum nodes.

Macros§

version_info
Macro to generate version information including the crate name, version, and git hash.

Structs§

ParseEnvironmentError
Error type for parsing an Environment from a string.
StartedServices
A struct that keeps track of the health of all async services started by the service.

Enums§

Environment
The environment the service is running in.

Functions§

default_shutdown_signal
Returns a future that completes when the application should shut down.
spawn_shutdown_task
Spawns a shutdown task and creates an associated CancellationToken. This task will complete when either the provided shutdown_signal futures completes or if some other tasks cancels the shutdown token. The associated shutdown token will be cancelled either way.