Expand description
Driver selection, configuration, and peer transport for a standalone
tsoracle node. See build.
Standalone::admin is the runtime membership-admin handle (MembershipAdmin): live for the openraft driver (add a learner, promote it to voter, remove a node, and list members — served over the --admin-listen gRPC port), and UnsupportedAdmin for the file and paxos drivers, which reject every mutating op.
Re-exports§
pub use admin::AdminError;pub use admin::MemberEntry;pub use admin::MemberRole;pub use admin::MembershipAdmin;pub use admin::MembershipView;pub use admin::NewMember;pub use admin::UnsupportedAdmin;
Modules§
- admin
- Driver-agnostic membership-admin surface. Re-exported types at the crate
root preserve the original public surface; the module itself is also
public so the
test_supportsub-module is reachable when its feature is enabled. Driver-agnostic membership-admin surface. The openraft impl lives inadmin::openraft; paxos and file useUnsupportedAdmin. - admin_
proto - Generated
tsoracle.admin.v1gRPC types (client + server). Public so thetsoracle adminCLI can use the client stub.
Structs§
- Admin
TlsConfig - mTLS material for the membership-admin gRPC server (PEM file paths,
read at build()). Presence on an
OpenraftConfigturns the admin port into mutual TLS:cert/keyis this node’s admin-server identity;caverifies connecting admin clients (operators dialing viatsoracle admin). - Fatal
Signal - One-per-node fail-fast signal. Any supervised transport-server task that
exits unexpectedly trips it; the bin’s run loop selects on
FatalSignal::trippednext to the OS shutdown signal and exits non-zero so an orchestrator restarts the node, instead of leaving a zombie whose peer/admin surface is dead while the consensus driver keeps running. - File
Config - Member
Addr - openraft’s three-address membership entry: the raft peer RPC address, the
scheme-less service endpoint clients are redirected to, and the scheme-less
admin endpoint the
tsoracle adminCLI is redirected to. - Openraft
Config - Paxos
Config - Peer
TlsConfig - mTLS material for the peer transport (PEM file paths, read at build()).
Presence on a driver config turns the peer transport into mutual TLS:
cert/keyis this node’s identity (used as both the peer-server identity and the peer-client identity when dialing);caverifies connecting peers. The CA MUST be cluster-dedicated — anyone holding a cert it signed can join replication. - Raft
Tuning - openraft timing knobs (milliseconds), defaulted to the values the example used.
- Standalone
- A constructed, running standalone node: the consensus driver plus the
background peer-transport task (if any). The caller (the bin) owns the
client-facing
tsoracle_server::Server; this type owns only the driver and peer transport. - Transport
Handle - Owns a spawned peer-transport server and shuts it down cooperatively.
The
filedriver has no peer transport, so it usesTransportHandle::noop.
Enums§
- Driver
Config - Standalone
Error - Failure modes when bootstrapping a standalone node.
Functions§
- build
- Open storage, construct the selected driver, and spawn its peer transport (binding the peer listener before returning, so a bind failure is a startup error rather than a background log line).
- init_
file_ seeded - One-shot seeded initialization for the file driver (migration setup).
- parse_
peer_ map - Parse a comma-separated
id=host:portpeer map. Public so the bin and examples can reuse it instead of duplicating the parser.