Compare commits

...

1 commit
main ... 0.5.1

Author SHA1 Message Date
398ddb1300
Version 0.5.1 for publication to crates.io 2021-12-16 13:21:52 +01:00
10 changed files with 84 additions and 74 deletions

14
Cargo.lock generated
View file

@ -382,7 +382,7 @@ dependencies = [
[[package]]
name = "garage"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"async-trait",
"bytes 1.1.0",
@ -411,7 +411,7 @@ dependencies = [
[[package]]
name = "garage_api"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"base64",
"bytes 1.1.0",
@ -443,7 +443,7 @@ dependencies = [
[[package]]
name = "garage_model"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"arc-swap",
"async-trait",
@ -466,7 +466,7 @@ dependencies = [
[[package]]
name = "garage_rpc"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"arc-swap",
"async-trait",
@ -491,7 +491,7 @@ dependencies = [
[[package]]
name = "garage_table"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"async-trait",
"bytes 1.1.0",
@ -511,7 +511,7 @@ dependencies = [
[[package]]
name = "garage_util"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"blake2",
"chrono",
@ -535,7 +535,7 @@ dependencies = [
[[package]]
name = "garage_web"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"err-derive 0.3.0",
"futures",

View file

@ -40,13 +40,13 @@ in
{
cargo2nixVersion = "0.9.0";
workspace = {
garage_util = rustPackages.unknown.garage_util."0.5.0";
garage_rpc = rustPackages.unknown.garage_rpc."0.5.0";
garage_table = rustPackages.unknown.garage_table."0.5.0";
garage_model = rustPackages.unknown.garage_model."0.5.0";
garage_api = rustPackages.unknown.garage_api."0.5.0";
garage_web = rustPackages.unknown.garage_web."0.5.0";
garage = rustPackages.unknown.garage."0.5.0";
garage_util = rustPackages.unknown.garage_util."0.5.1";
garage_rpc = rustPackages.unknown.garage_rpc."0.5.1";
garage_table = rustPackages.unknown.garage_table."0.5.1";
garage_model = rustPackages.unknown.garage_model."0.5.1";
garage_api = rustPackages.unknown.garage_api."0.5.1";
garage_web = rustPackages.unknown.garage_web."0.5.1";
garage = rustPackages.unknown.garage."0.5.1";
};
"registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.18" = overridableMkRustCrate (profileName: rec {
name = "aho-corasick";
@ -253,7 +253,7 @@ in
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo { inherit name version; sha256 = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469"; };
dependencies = {
${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" || hostPlatform.config == "aarch64-apple-darwin" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.103" { inherit profileName; };
${ if hostPlatform.config == "aarch64-apple-darwin" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.103" { inherit profileName; };
};
});
@ -613,9 +613,9 @@ in
};
});
"unknown".garage."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/garage");
dependencies = {
@ -623,12 +623,12 @@ in
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; };
garage_api = rustPackages."unknown".garage_api."0.5.0" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_web = rustPackages."unknown".garage_web."0.5.0" { inherit profileName; };
garage_api = rustPackages."unknown".garage_api."0.5.1" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
garage_web = rustPackages."unknown".garage_web."0.5.1" { inherit profileName; };
git_version = rustPackages."registry+https://github.com/rust-lang/crates.io-index".git-version."0.3.5" { inherit profileName; };
hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; };
sodiumoxide = rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; };
@ -645,9 +645,9 @@ in
};
});
"unknown".garage_api."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_api."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_api";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/api");
dependencies = {
@ -658,9 +658,9 @@ in
err_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.0" { profileName = "__noProfile"; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; };
hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.10.1" { inherit profileName; };
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.5" { inherit profileName; };
@ -680,9 +680,9 @@ in
};
});
"unknown".garage_model."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_model."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_model";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/model");
dependencies = {
@ -690,9 +690,9 @@ in
async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.51" { profileName = "__noProfile"; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; };
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; };
netapp = rustPackages."registry+https://github.com/rust-lang/crates.io-index".netapp."0.3.0" { inherit profileName; };
@ -706,9 +706,9 @@ in
};
});
"unknown".garage_rpc."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_rpc."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_rpc";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/rpc");
dependencies = {
@ -717,7 +717,7 @@ in
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
gethostname = rustPackages."registry+https://github.com/rust-lang/crates.io-index".gethostname."0.2.1" { inherit profileName; };
hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; };
hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.13" { inherit profileName; };
@ -734,9 +734,9 @@ in
};
});
"unknown".garage_table."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_table."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_table";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/table");
dependencies = {
@ -744,8 +744,8 @@ in
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
hexdump = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" { inherit profileName; };
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; };
rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.4" { inherit profileName; };
@ -757,9 +757,9 @@ in
};
});
"unknown".garage_util."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_util."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_util";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/util");
dependencies = {
@ -784,18 +784,18 @@ in
};
});
"unknown".garage_web."0.5.0" = overridableMkRustCrate (profileName: rec {
"unknown".garage_web."0.5.1" = overridableMkRustCrate (profileName: rec {
name = "garage_web";
version = "0.5.0";
version = "0.5.1";
registry = "unknown";
src = fetchCrateLocal (workspaceSrc + "/src/web");
dependencies = {
err_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.0" { profileName = "__noProfile"; };
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; };
garage_api = rustPackages."unknown".garage_api."0.5.0" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; };
garage_api = rustPackages."unknown".garage_api."0.5.1" { inherit profileName; };
garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; };
garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; };
garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; };
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.5" { inherit profileName; };
hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.13" { inherit profileName; };
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; };

View file

@ -1,6 +1,6 @@
[package]
name = "garage_api"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@ -14,9 +14,9 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_model = { version = "0.5.0", path = "../model" }
garage_table = { version = "0.5.0", path = "../table" }
garage_util = { version = "0.5.0", path = "../util" }
garage_model = { version = "0.5.1", path = "../model" }
garage_table = { version = "0.5.1", path = "../table" }
garage_util = { version = "0.5.1", path = "../util" }
base64 = "0.13"
bytes = "1.0"

View file

@ -1,6 +1,6 @@
[package]
name = "garage"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@ -15,12 +15,12 @@ path = "main.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_api = { version = "0.5.0", path = "../api" }
garage_model = { version = "0.5.0", path = "../model" }
garage_rpc = { version = "0.5.0", path = "../rpc" }
garage_table = { version = "0.5.0", path = "../table" }
garage_util = { version = "0.5.0", path = "../util" }
garage_web = { version = "0.5.0", path = "../web" }
garage_api = { version = "0.5.1", path = "../api" }
garage_model = { version = "0.5.1", path = "../model" }
garage_rpc = { version = "0.5.1", path = "../rpc" }
garage_table = { version = "0.5.1", path = "../table" }
garage_util = { version = "0.5.1", path = "../util" }
garage_web = { version = "0.5.1", path = "../web" }
bytes = "1.0"
git-version = "0.3.4"

View file

@ -1,6 +1,6 @@
[package]
name = "garage_model"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@ -14,9 +14,9 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_rpc = { version = "0.5.0", path = "../rpc" }
garage_table = { version = "0.5.0", path = "../table" }
garage_util = { version = "0.5.0", path = "../util" }
garage_rpc = { version = "0.5.1", path = "../rpc" }
garage_table = { version = "0.5.1", path = "../table" }
garage_util = { version = "0.5.1", path = "../util" }
async-trait = "0.1.7"
arc-swap = "1.0"

View file

@ -1,6 +1,6 @@
[package]
name = "garage_rpc"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@ -14,7 +14,7 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_util = { version = "0.5.0", path = "../util" }
garage_util = { version = "0.5.1", path = "../util" }
arc-swap = "1.0"
bytes = "1.0"

View file

@ -1,6 +1,6 @@
[package]
name = "garage_table"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@ -14,8 +14,8 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_rpc = { version = "0.5.0", path = "../rpc" }
garage_util = { version = "0.5.0", path = "../util" }
garage_rpc = { version = "0.5.1", path = "../rpc" }
garage_util = { version = "0.5.1", path = "../util" }
async-trait = "0.1.7"
bytes = "1.0"

View file

@ -1,6 +1,6 @@
[package]
name = "garage_util"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"

View file

@ -77,11 +77,21 @@ where
self.v = new_value;
}
/// Get the timestamp currently associated with the value
pub fn timestamp(&self) -> u64 {
self.ts
}
/// Get the CRDT value
pub fn get(&self) -> &T {
&self.v
}
/// Take the CRDT value
pub fn take(self) -> T {
self.v
}
/// Get a mutable reference to the CRDT's value
///
/// This is usefull to mutate the inside value without changing the LWW timestamp.

View file

@ -1,6 +1,6 @@
[package]
name = "garage_web"
version = "0.5.0"
version = "0.5.1"
authors = ["Alex Auvolat <alex@adnab.me>", "Quentin Dufour <quentin@dufour.io>"]
edition = "2018"
license = "AGPL-3.0"
@ -14,10 +14,10 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
garage_api = { version = "0.5.0", path = "../api" }
garage_model = { version = "0.5.0", path = "../model" }
garage_util = { version = "0.5.0", path = "../util" }
garage_table = { version = "0.5.0", path = "../table" }
garage_api = { version = "0.5.1", path = "../api" }
garage_model = { version = "0.5.1", path = "../model" }
garage_util = { version = "0.5.1", path = "../util" }
garage_table = { version = "0.5.1", path = "../table" }
err-derive = "0.3"
log = "0.4"