Skip to content

Commit

Permalink
Updated README.md with new package name
Browse files Browse the repository at this point in the history
  • Loading branch information
sushrut141 committed Apr 19, 2021
1 parent 6c75f8f commit a04ee84
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ DharmaDB is a persistent, fault tolerant Key-Value Store written in Rust.
## Setup
Just create an instance of `Dharma` to get the key value store up and running.
```rust
use dharma::dharma::Dharma;
use dharma::errors::Errors;
use dharma::options::DharmaOpts;
use dharmadb::dharma::Dharma;
use dharmadb::errors::Errors;
use dharmadb::options::DharmaOpts;

// configure options such as database persistence path
// or block size using DharmaOpts or use the defaults
Expand All @@ -33,9 +33,9 @@ using the `Dharma<K, V>` interface.

The put operation is used to persist a value associated with a key to the store.
```rust
use dharma::dharma::Dharma;
use dharma::errors::Errors;
use dharma::options::DharmaOpts;
use dharmadb::dharma::Dharma;
use dharmadb::errors::Errors;
use dharmadb::options::DharmaOpts;

let options = DharmaOpts::default();
let db_result: Result<Dharma<MyKey, MyValue>, Errors> = Dharma::new(options);
Expand All @@ -48,9 +48,9 @@ let put_result = db.put(my_key, my_value);

The get operation retrieves the value associated with a key if it exists.
```rust
use dharma::dharma::Dharma;
use dharma::errors::Errors;
use dharma::options::DharmaOpts;
use dharmadb::dharma::Dharma;
use dharmadb::errors::Errors;
use dharmadb::options::DharmaOpts;

let options = DharmaOpts::default();
let db_result: Result<Dharma<MyKey, MyValue>, Errors> = Dharma::new(options);
Expand All @@ -65,9 +65,9 @@ The recover operation is required in cases of unexpected crashes.
Generally, `Dharma` will detect non-graceful exit and suggest running
recovery on startup.
```rust
use dharma::dharma::Dharma;
use dharma::errors::Errors;
use dharma::options::DharmaOpts;
use dharmadb::dharma::Dharma;
use dharmadb::errors::Errors;
use dharmadb::options::DharmaOpts;

let options = DharmaOpts::default();
// try recovering data after non-graceful shutdown by calling recover
Expand Down

0 comments on commit a04ee84

Please sign in to comment.