2 unstable releases
0.2.0 | Jul 17, 2024 |
---|---|
0.1.0 | Jul 16, 2024 |
#1953 in Network programming
187 downloads per month
Used in termscp
81KB
1.5K
SLoC
remotefs-kube
~ Remotefs kube client ~
Developed by @veeso
Current version: 0.2.0 (17/07/2024)
About remotefs-kube ☁️
remotefs client implementation for Kube.
Get started
First of all you need to add remotefs and the client to your project dependencies:
remotefs = "^0.2"
remotefs-kube = "^0.2"
these features are supported:
find
: enablefind()
method for RemoteFs. (enabled by default)no-log
: disable logging. By default, this library will log via thelog
crate.
Kube client
Here is a basic usage example, with the Kube
client, which is very similiar to the Scp
client.
// import remotefs trait and client
use remotefs::RemoteFs;
use remotefs_ssh::{SshConfigParseRule, SftpFs, SshOpts};
use std::path::Path;
let rt = Arc::new(
tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap(),
);
let mut client: KubeFs = KubeFs::new("my-pod", &rt);
// connect
assert!(client.connect().is_ok());
// get working directory
println!("Wrkdir: {}", client.pwd().ok().unwrap().display());
// change working directory
assert!(client.change_dir(Path::new("/tmp")).is_ok());
// disconnect
assert!(client.disconnect().is_ok());
Client compatibility table ✔️
The following table states the compatibility for the client client and the remote file system trait method.
Note: connect()
, disconnect()
and is_connected()
MUST always be supported, and are so omitted in the table.
Client/Method | Kube |
---|---|
append_file | No |
append | No |
change_dir | Yes |
copy | Yes |
create_dir | Yes |
create_file | Yes |
create | No |
exec | Yes |
exists | Yes |
list_dir | Yes |
mov | Yes |
open_file | Yes |
open | No |
pwd | Yes |
remove_dir_all | Yes |
remove_dir | Yes |
remove_file | Yes |
setstat | Yes |
stat | Yes |
symlink | Yes |
Changelog ⏳
View remotefs-kube's changelog HERE
License 📃
remotefs-kube is licensed under the MIT license.
You can read the entire license HERE
Dependencies
~65MB
~1M SLoC