From 49c2b47c2de683f136fca08b2078ecaebfec449d Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Mon, 16 Oct 2023 17:09:33 +0800 Subject: [PATCH] docs: Add docs on website for tikv service Signed-off-by: Manjusaka --- website/docs/services/tikv.mdx | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 website/docs/services/tikv.mdx diff --git a/website/docs/services/tikv.mdx b/website/docs/services/tikv.mdx new file mode 100644 index 000000000000..4ac7ffc4c1f0 --- /dev/null +++ b/website/docs/services/tikv.mdx @@ -0,0 +1,63 @@ +--- +title: TiKV +--- + +[TiKV](https://tikv.org/) services support. + +import Docs from '../../../core/src/services/tikv/docs.md' + + + +### Via Config + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + +```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(()) +} +``` + + + + +```javascript +import { Operator } from "opendal"; + +async function main() { + const config = { + endpoints: "127.0.0.1:2379", + }; + const op = new Operator("tikv", config); +} +``` + + + + +```python +import opendal + +config = { + "endpoints": "127.0.0.1:2379", +} + +op = opendal.Operator("tikv", **config) +``` + + +