Skip to content

Commit 194775d

Browse files
git add src/component/adapter/cache.rs
1 parent ea0691b commit 194775d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

src/component/adapter/cache.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
use crate::component::bindings::fastly::adapter::adapter_cache;
2+
use crate::component::bindings::fastly::compute::{cache, types};
3+
use crate::linking::ComponentCtx;
4+
use crate::Error;
5+
use wasmtime::component::Resource;
6+
7+
impl adapter_cache::Host for ComponentCtx {
8+
fn set_lookup_service_id_deprecated(
9+
&mut self,
10+
_options: Resource<cache::ExtraLookupOptions>,
11+
_service_id: String,
12+
) -> Result<(), types::Error> {
13+
Err(Error::Unsupported {
14+
msg: "adapter-cache.set-lookup-service-id-deprecated is not supported on Viceroy.",
15+
}
16+
.into())
17+
}
18+
19+
fn set_write_service_id_deprecated(
20+
&mut self,
21+
_options: Resource<cache::ExtraWriteOptions>,
22+
_service_id: String,
23+
) -> Result<(), types::Error> {
24+
Err(Error::Unsupported {
25+
msg: "adapter-cache.set-write-service-id-deprecated is not supported on Viceroy.",
26+
}
27+
.into())
28+
}
29+
30+
fn set_replace_service_id_deprecated(
31+
&mut self,
32+
_options: Resource<cache::ExtraReplaceOptions>,
33+
_service_id: String,
34+
) -> Result<(), types::Error> {
35+
Err(Error::Unsupported {
36+
msg: "adapter-cache.set-replace-service-id-deprecated is not supported on Viceroy.",
37+
}
38+
.into())
39+
}
40+
}

0 commit comments

Comments
 (0)