Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add docs on website for tikv service #3302

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions website/docs/services/tikv.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: TiKV
---

[TiKV](https://tikv.org/) services support.

import Docs from '../../../core/src/services/tikv/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("endpoints".to_string(), "127.0.0.1:2379".to_string());

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

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

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

async function main() {
const config = {
endpoints: "127.0.0.1:2379",
};
const op = new Operator("tikv", config);
}
```

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

```python
import opendal

config = {
"endpoints": "127.0.0.1:2379",
}

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

</TabItem>
</Tabs>
Loading