Skip to content

Commit b839bf2

Browse files
lcianjan-auer
andauthored
feat(rust-client): Introduce new API (#190)
Co-authored-by: Jan Michael Auer <[email protected]>
1 parent 98cc798 commit b839bf2

File tree

12 files changed

+536
-231
lines changed

12 files changed

+536
-231
lines changed

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/rust/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ bytes = { workspace = true }
1616
futures-util = { workspace = true }
1717
objectstore-types = { workspace = true }
1818
reqwest = { workspace = true, features = ["json", "stream"] }
19-
sentry = { workspace = true }
19+
sentry-core = { version = ">=0.41", features = ["client"] }
2020
serde = { workspace = true }
2121
thiserror = { workspace = true }
22-
tokio = { workspace = true }
22+
# See https://github.com/getsentry/relay/blob/9c491a185a289e09ee9d3f56d89bd9d1fa71d815/Cargo.toml#L211
23+
tokio = "1.45.0"
2324
tokio-util = { workspace = true, features = ["io"] }
25+
url = "2.5.7"
2426

2527
[dev-dependencies]
2628
objectstore-server = { workspace = true }

clients/rust/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use objectstore_client::ClientBuilder;
1212
let client = ClientBuilder::new("http://localhost:8888/", "my-usecase")?
1313
.for_organization(42);
1414

15-
let id = client.put("hello world").send().await?;
16-
let object = client.get(&id.key).send().await?.expect("object to exist");
15+
let response = client.put("hello world").send().await?;
16+
let object = client.get(&response.key).send().await?.expect("object to exist");
1717
assert_eq!(object.payload().await?, "hello world");
1818
```
1919

0 commit comments

Comments
 (0)