Skip to content

Commit

Permalink
Merge branch 'upgrade_1.39'
Browse files Browse the repository at this point in the history
  • Loading branch information
sehz committed Nov 17, 2019
2 parents 68288a3 + 4e9a24a commit e36ea14
Show file tree
Hide file tree
Showing 56 changed files with 825 additions and 1,548 deletions.
2,070 changes: 670 additions & 1,400 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
"k8-diff",
"kf-protocol",
"kf-protocol/kf-protocol-dump",
"kf-protocol/kf-protocol-build",
# "kf-protocol/kf-protocol-build",
"kf-socket",
"kf-service",
"k8-metadata",
Expand Down
18 changes: 18 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,31 @@ kubectl create -f k8-util/samples/crd/spu_5002.yaml
kubectl create -f k8-util/samples/crd/spu_5003.yaml
```

## Starting SC
```
./dev-tools/log/debug-spu-min 5001 9005 9006
```

## Starting custom SPU
```
./dev-tools/log/debug-spu-min 5001 9005 9006
./dev-tools/log/debug-spu-min 5002 9007 9008
./dev-tools/log/debug-spu-min 5003 9009 9010
```

## Running CLI

To connect with local SC, use "--sc" parameter as shown below.
Please refer to fluvio web site for CLI operation.

Get SPU

```
fluvio spu list --sc 127.0.0.1:9003
```






Expand Down
2 changes: 1 addition & 1 deletion api/internal-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "internal-api"
version = "0.1.0-alpha.1"
version = "0.2.0-alpha.1"
authors = ["fluvio.io"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion api/sc-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sc-api"
version = "0.1.0-alpha.1"
version = "0.2.0-alpha.1"
authors = ["fluvio.io"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion api/spu-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spu-api"
version = "0.1.0-alpha.1"
version = "0.2.0-alpha.1"
authors = ["fluvio.io"]
edition = "2018"

Expand Down
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fluvio"
version = "0.1.0-alpha.1"
version = "0.2.0-alpha.1"
edition = "2018"
authors = ["fluvio.io"]

Expand All @@ -24,7 +24,7 @@ serde_json = "1.0.39"
serde_yaml = "0.8.8"
ctrlc = "3.1.3"
regex = "1.1.6"
futures-preview = { version = "0.3.0-alpha.17", features = ['nightly','async-await'] }
futures = { version = "0.3.1", features = ['async-await'] }
future-helper = { path = "../future-helper" }
kf-protocol = { path = "../kf-protocol"}
kf-socket = { path = "../kf-socket" }
Expand Down
6 changes: 3 additions & 3 deletions cli/src/profile/profile_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ pub mod test {

// expecting error
assert!(result.is_err());
assert_eq!(
format!("{}", result.unwrap_err()),
"missing field `port` for key `sc`"
assert!(
format!("{}", result.unwrap_err()).contains(
"missing field `port` for key `sc`")
);
}

Expand Down
4 changes: 2 additions & 2 deletions future-aio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "future-aio"
version = "0.1.0-alpha.1"
version = "0.2.0-alpha.1"
edition = "2018"
authors = ["fluvio.io"]

Expand All @@ -12,7 +12,7 @@ bytes = "0.4.12"
tokio_1 = { version = "0.1.18", package = "tokio" }
tokio-threadpool-1 = { version = "0.1.13", package = "tokio-threadpool" }
memmap = "0.7.0"
futures-preview = { version = "0.3.0-alpha.17" }
futures = { version = "0.3.1" }
future-helper = { path = "../future-helper"}
futures_1 = { version = "0.1.25", package = "futures" }
pin-utils = "0.1.0-alpha.4"
Expand Down
2 changes: 1 addition & 1 deletion future-aio/src/fs/shared_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use log::trace;

use futures::io::AsyncRead;

use futures::Poll;
use std::task::Poll;
use futures::Future;
use pin_utils::unsafe_unpinned;
use pin_utils::pin_mut;
Expand Down
2 changes: 1 addition & 1 deletion future-aio/src/fs/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use futures::io::AsyncWrite;
use futures::sink::Sink;
use futures::ready;
use futures::Future;
use futures::Poll;
use std::task::Poll;
use pin_utils::unsafe_pinned;
use pin_utils::unsafe_unpinned;

Expand Down
28 changes: 15 additions & 13 deletions future-aio/src/write.rs
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@

use std::io;
use std::pin::Pin;
use std::mem::replace;
use std::task::Context;

use futures::io::AsyncWrite;
use futures::Poll;
use std::task::Poll;
use futures::ready;
use futures::future::Future;



/// Derived from future io Writeall,
/// Derived from future io Writeall,
/// Instead of buf restricted to[u8], it supports asref
#[derive(Debug)]
pub struct WriteBufAll<'a, W: ?Sized + 'a + Unpin,B> {
pub struct WriteBufAll<'a, W: ?Sized + 'a + Unpin, B> {
writer: &'a mut W,
buf: B
buf: B,
}

// Pinning is never projected to fields
impl<W: ?Sized + Unpin,B> Unpin for WriteBufAll<'_, W,B> {}
impl<W: ?Sized + Unpin, B> Unpin for WriteBufAll<'_, W, B> {}

impl<'a, W: AsyncWrite + ?Sized + Unpin,B> WriteBufAll<'a, W,B > {
impl<'a, W: AsyncWrite + ?Sized + Unpin, B> WriteBufAll<'a, W, B> {
pub(super) fn new(writer: &'a mut W, buf: B) -> Self {
WriteBufAll { writer, buf }
}
}

impl<W: AsyncWrite + ?Sized + Unpin,B> Future for WriteBufAll<'_, W,B> where B: AsRef<[u8]> {
impl<W: AsyncWrite + ?Sized + Unpin, B> Future for WriteBufAll<'_, W, B>
where
B: AsRef<[u8]>,
{
type Output = io::Result<()>;

fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
Expand All @@ -41,7 +41,7 @@ impl<W: AsyncWrite + ?Sized + Unpin,B> Future for WriteBufAll<'_, W,B> where B:
buf = rest;
}
if n == 0 {
return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))
return Poll::Ready(Err(io::ErrorKind::WriteZero.into()));
}
}

Expand All @@ -50,8 +50,10 @@ impl<W: AsyncWrite + ?Sized + Unpin,B> Future for WriteBufAll<'_, W,B> where B:
}

pub trait AsyncWrite2: AsyncWrite + Unpin {

fn write_buf_all<'a,B>(&'a mut self, buf: B) -> WriteBufAll<'a, Self,B> where B: AsRef<[u8]> {
fn write_buf_all<'a, B>(&'a mut self, buf: B) -> WriteBufAll<'a, Self, B>
where
B: AsRef<[u8]>,
{
WriteBufAll::new(self, buf)
}
}
Loading

0 comments on commit e36ea14

Please sign in to comment.