This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 4c1ae905c docs: Add docs on website for cacache services (#3294)
4c1ae905c is described below
commit 4c1ae905cd4beda9ef2343dfd01bb70ca25adccf
Author: Nadeshiko Manju <[email protected]>
AuthorDate: Mon Oct 16 15:42:01 2023 +0800
docs: Add docs on website for cacache services (#3294)
* docs: Add docs on website for cacahe services
Signed-off-by: Manjusaka <[email protected]>
* Update docs
Signed-off-by: Manjusaka <[email protected]>
---------
Signed-off-by: Manjusaka <[email protected]>
---
website/docs/services/cacache.mdx | 60 +++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/website/docs/services/cacache.mdx
b/website/docs/services/cacache.mdx
new file mode 100644
index 000000000..d3262cbf6
--- /dev/null
+++ b/website/docs/services/cacache.mdx
@@ -0,0 +1,60 @@
+---
+title: Cacache
+---
+
+[Cacache](https://github.com/zkat/cacache-rs) services support.
+
+import Docs from '../../../core/src/services/cacache/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::services::Cacache;
+use opendal::Operator;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+
+ let mut map = HashMap::new();
+ map.insert("datadir".to_string(), "/tmp/opendal/cacache".to_string());
+
+ let op: Operator = Operator::via_map(Scheme::Cacache, map)?;
+ Ok(())
+}
+```
+
+ </TabItem>
+ <TabItem value="node.js" label="Node.js">
+
+```javascript
+import { Operator } from require('opendal');
+
+async function main() {
+ const op = new Operator("cacache", {
+ datadir: '/tmp/opendal/cacache'
+ });
+}
+```
+
+ </TabItem>
+ <TabItem value="python" label="Python">
+
+```python
+import opendal
+
+op = opendal.Operator("cacache", {
+ "datadir": "/tmp/opendal/cacache"
+})
+```
+
+ </TabItem>
+</Tabs>