caio.co/de/foca


Add new, experimental, feture gated notifications 💬 by Caio 3 months ago (log)
This patch introduces Notification::{DataSent,DataReceived} which
allows peeking into the interaction between peers without having
to deal with traces

Blob Cargo.toml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[package]
name = "foca"
version = "0.17.2"
rust-version = "1.81.0"
authors = ["Caio <contact@caio.co>"]
edition = "2021"
license = "MPL-2.0"
description = "Gossip-based cluster membership discovery, based on SWIM"
keywords = ["swim", "gossip", "service-discovery", "memberlist"]
categories = ["network-programming", "no-std"]
repository = "https://caio.co/de/foca/"
homepage = "https://caio.co/de/foca/"
documentation = "https://docs.rs/foca"

[package.metadata.docs.rs]
all-features = true

[features]
# Will always be empty
default = []

# Adds compatibility with some types and traits
std = []
# Exposes `BincodeCodec` a lean general-purpose std-only codec
bincode-codec = ["std", "serde", "bincode", "bytes/std"]
# Exposes `PostcardCodec`, a no_std-friendly codec
postcard-codec = ["serde", "postcard"]
# Enables experimental message-related notifications
unstable-notifications = []

[dependencies]
rand = { version = "0.8", default-features = false }
bytes = { version = "1", default-features = false }

serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true }
bincode = { version = "1", default-features = false, optional = true }
postcard = { version = "1.0", default-features = false, optional = true }
tracing = { version = "0.1", default-features = false, features = ["attributes"], optional = true }

[[example]]
name = "identity_golf"
required-features = ["std"]

[[example]]
name = "foca_insecure_udp_agent"
required-features = ["std", "tracing", "bincode-codec"]

[dev-dependencies]
clap = { version = "2", default-features = false }
tokio = { version = "1", default-features = false, features = ["rt", "macros", "sync", "time", "net"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
uuid = { version = "0.8", features = ["v4", "serde"] }
rand = { version = "0.8", features = ["small_rng"] }
serde = { version = "1", features = ["derive"] }