Skip to content

Commit

Permalink
docs: Add docs on website for persy service (#3300)
Browse files Browse the repository at this point in the history
Signed-off-by: Manjusaka <[email protected]>
  • Loading branch information
Zheaoli authored Oct 16, 2023
1 parent 9b9230c commit 1bb601b
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions website/docs/services/persy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Persy
---

[Persy](https://persy.rs/) service support.

import Docs from '../../../core/src/services/persy/docs.md'

<Docs components={props.components} />

### Via Config

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="rust" label="Rust" default>

```rust
use anyhow::Result;
use opendal::Operator;
use opendal::Scheme;
use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<()> {
let mut config = HashMap::new();
config.insert("datafile".to_string(), "./test.persy".to_string());
config.insert("segment".to_string(), "data".to_string());
config.insert("index".to_string(), "index".to_string());

let op: Operator = Operator::via_map(Scheme::Persy, config)?;
Ok(())
}
```

</TabItem>
<TabItem value="node.js" label="Node.js">

```javascript
import { Operator } from "opendal";

async function main() {
const config = {
datafile: "./test.persy",
segment: "data",
index: "index"
};
const op = new Operator("persy", config);
}
```

</TabItem>
<TabItem value="python" label="Python">

```python
import opendal

config = {
"datafile": "./test.persy",
"segment": "data",
"index": "index"
}

op = opendal.Operator("persy", **config)
```

</TabItem>
</Tabs>

0 comments on commit 1bb601b

Please sign in to comment.