Skip to main content

Module service

Module service 

Source
Expand description

[tower::Service] integration + thread-pool.

§service

The service module implements the [tower] integration, along with the reader/writer thread-pool system.

The thread-pool allows outside crates to communicate with it by sending database requests and receiving responses asynchronously - without having to actually worry and handle the database themselves.

The system is managed by this crate, and only requires initialisation by the user.

Structs§

BlockchainReadHandle
The [tower::Service] handle to read from the database.
BlockchainWriteHandle
The [tower::Service] handle to write to the database.

Functions§

init_with_pool
Initialize a database, and return a read/write handle to it.
init_write_service
Initialise the blockchain write service from a BlockchainDatabase.