This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::task::{Context, Poll}; | |
use std::pin::Pin; | |
use hyper::client::{connect::{Connection, Connected}}; | |
use tokio::net::{TcpStream}; | |
use tokio::io::{ReadBuf, AsyncWrite, AsyncRead}; | |
use async_speed_limit::{limiter::{Limiter, Consume}, clock::{StandardClock}}; | |
use futures_util::future::Future; | |
//use anyhow::Error; | |
use std::io::Error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::sync::Arc; | |
#[derive(Clone, Debug)] | |
pub enum Error { | |
pub kind: Arc<ErrorKind>, | |
} | |
impl std::error::Error for Error { | |
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { | |
match *self.kind { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -lt 2 ]; then | |
echo "$0: <resource group> <pub key file>" | |
echo "Optional: you can generate ssh key pair using: | |
'az sshkey create --name <key name> --resource-group <resource group name>'" | |
exit 1 | |
fi | |
rg=$1 | |
pubkey=$2 |