Crate cuprate_database_service

Source
Expand description

§Cuprate’s tower::Service database abstraction.

This crate contains the building blocks for creating a tower::Service interface to cuprate_blockchain.

It is split into 2 tower::Services:

  1. A read service which is backed by a rayon::ThreadPool
  2. A write service which spawns a single thread to handle write requests

Structs§

DatabaseReadService
The rayon::ThreadPool service.
DatabaseWriteHandle
Write handle to the database.

Enums§

ReaderThreads
Amount of database reader threads to spawn.

Functions§

init_thread_pool
Initialize the reader thread-pool backed by rayon.