refactor(tvix/*store): helper for channel creation from url
This moves the repetitive code to parse a URL and create a channel connected to it into `tvix_castore::channel::from_url`. Part of b/308 Change-Id: Idd342cd71cad5e78a9b258b38c1b227993e75310 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9707 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
3f011d2762
commit
9757bf6377
6 changed files with 88 additions and 129 deletions
|
|
@ -34,6 +34,12 @@ impl From<Error> for Status {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<crate::channel::Error> for Error {
|
||||
fn from(value: crate::channel::Error) -> Self {
|
||||
Self::StorageError(value.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this should probably go somewhere else?
|
||||
impl From<Error> for std::io::Error {
|
||||
fn from(value: Error) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue