Skip to content

Commit f7dc5c3

Browse files
committed
ci: include version in WIT deps
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 712d633 commit f7dc5c3

File tree

115 files changed

+3557
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3557
-2
lines changed

ci/vendor-wit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ make_vendor() {
2020

2121
for package in $packages; do
2222
IFS='@' read -r repo tag <<< "$package"
23-
mkdir -p $path/$repo
23+
mkdir -p $path/$package
2424
cached_extracted_dir="$cache_dir/$repo-$tag"
2525

2626
if [[ ! -d $cached_extracted_dir ]]; then
@@ -30,7 +30,7 @@ make_vendor() {
3030
rm -rf $cached_extracted_dir/wit/deps*
3131
fi
3232

33-
cp -r $cached_extracted_dir/wit/* $path/$repo
33+
cp -r $cached_extracted_dir/wit/* $path/$package
3434
done
3535
}
3636

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
interface store {
2+
/// An error type that encapsulates the different errors that can occur fetching configuration values.
3+
variant error {
4+
/// This indicates an error from an "upstream" config source.
5+
/// As this could be almost _anything_ (such as Vault, Kubernetes ConfigMaps, KeyValue buckets, etc),
6+
/// the error message is a string.
7+
upstream(string),
8+
/// This indicates an error from an I/O operation.
9+
/// As this could be almost _anything_ (such as a file read, network connection, etc),
10+
/// the error message is a string.
11+
/// Depending on how this ends up being consumed,
12+
/// we may consider moving this to use the `wasi:io/error` type instead.
13+
/// For simplicity right now in supporting multiple implementations, it is being left as a string.
14+
io(string),
15+
}
16+
17+
/// Gets a configuration value of type `string` associated with the `key`.
18+
///
19+
/// The value is returned as an `option<string>`. If the key is not found,
20+
/// `Ok(none)` is returned. If an error occurs, an `Err(error)` is returned.
21+
get: func(
22+
/// A string key to fetch
23+
key: string
24+
) -> result<option<string>, error>;
25+
26+
/// Gets a list of configuration key-value pairs of type `string`.
27+
///
28+
/// If an error occurs, an `Err(error)` is returned.
29+
get-all: func() -> result<list<tuple<string, string>>, error>;
30+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package wasi:config@0.2.0-draft;
2+
3+
world imports {
4+
/// The interface for wasi:config/store
5+
import store;
6+
}

0 commit comments

Comments
 (0)