summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/examples')
-rw-r--r--ipfs-api/examples/add_file.rs4
-rw-r--r--ipfs-api/examples/add_tar.rs4
-rw-r--r--ipfs-api/examples/bootstrap_default.rs4
-rw-r--r--ipfs-api/examples/config.rs4
-rw-r--r--ipfs-api/examples/dag.rs4
-rw-r--r--ipfs-api/examples/dns.rs4
-rw-r--r--ipfs-api/examples/get_commands.rs4
-rw-r--r--ipfs-api/examples/get_stats.rs4
-rw-r--r--ipfs-api/examples/get_swarm.rs4
-rw-r--r--ipfs-api/examples/get_version.rs4
-rw-r--r--ipfs-api/examples/log_tail.rs4
-rw-r--r--ipfs-api/examples/mfs.rs4
-rw-r--r--ipfs-api/examples/ping_peer.rs4
-rw-r--r--ipfs-api/examples/pubsub.rs4
-rw-r--r--ipfs-api/examples/replace_config.rs4
-rw-r--r--ipfs-api/examples/resolve_name.rs4
16 files changed, 32 insertions, 32 deletions
diff --git a/ipfs-api/examples/add_file.rs b/ipfs-api/examples/add_file.rs
index 3015684..5917884 100644
--- a/ipfs-api/examples/add_file.rs
+++ b/ipfs-api/examples/add_file.rs
@@ -11,8 +11,8 @@ use std::fs::File;
// Creates an Ipfs client, and adds this source file to Ipfs.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/add_tar.rs b/ipfs-api/examples/add_tar.rs
index 0bf0eb9..a89c805 100644
--- a/ipfs-api/examples/add_tar.rs
+++ b/ipfs-api/examples/add_tar.rs
@@ -13,8 +13,8 @@ use tar::Builder;
// Creates an Ipfs client, and adds this source file to Ipfs.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/bootstrap_default.rs b/ipfs-api/examples/bootstrap_default.rs
index 9377c49..8dc3772 100644
--- a/ipfs-api/examples/bootstrap_default.rs
+++ b/ipfs-api/examples/bootstrap_default.rs
@@ -11,8 +11,8 @@ use ipfs_api::IpfsClient;
// Lists clients in bootstrap list, then adds the default list, then removes
// them, and readds them.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/config.rs b/ipfs-api/examples/config.rs
index 884ecb4..3964146 100644
--- a/ipfs-api/examples/config.rs
+++ b/ipfs-api/examples/config.rs
@@ -10,8 +10,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, read & set config values.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/dag.rs b/ipfs-api/examples/dag.rs
index 9dff2bb..20d7bef 100644
--- a/ipfs-api/examples/dag.rs
+++ b/ipfs-api/examples/dag.rs
@@ -12,8 +12,8 @@ use std::io::Cursor;
// Creates an Ipfs client, and adds this dag object to Ipfs then fetch it back.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/dns.rs b/ipfs-api/examples/dns.rs
index 02857e0..a9b0604 100644
--- a/ipfs-api/examples/dns.rs
+++ b/ipfs-api/examples/dns.rs
@@ -10,8 +10,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, resolves ipfs.io, and lists the contents of it.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/get_commands.rs b/ipfs-api/examples/get_commands.rs
index 4aa91ce..5ca7b00 100644
--- a/ipfs-api/examples/get_commands.rs
+++ b/ipfs-api/examples/get_commands.rs
@@ -32,8 +32,8 @@ fn print_recursive(indent: usize, cmd: &response::CommandsResponse) {
// Creates an Ipfs client, and gets a list of available commands from the
// Ipfs server.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/get_stats.rs b/ipfs-api/examples/get_stats.rs
index f6eef0f..c2b6835 100644
--- a/ipfs-api/examples/get_stats.rs
+++ b/ipfs-api/examples/get_stats.rs
@@ -10,8 +10,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, and gets some stats about the Ipfs server.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/get_swarm.rs b/ipfs-api/examples/get_swarm.rs
index 67dc70b..114f70e 100644
--- a/ipfs-api/examples/get_swarm.rs
+++ b/ipfs-api/examples/get_swarm.rs
@@ -11,8 +11,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, and gets information about your local address, and
// connected peers.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/get_version.rs b/ipfs-api/examples/get_version.rs
index 9d22988..bc91f50 100644
--- a/ipfs-api/examples/get_version.rs
+++ b/ipfs-api/examples/get_version.rs
@@ -10,8 +10,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, and gets the version of the Ipfs server.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/log_tail.rs b/ipfs-api/examples/log_tail.rs
index 79b6e65..2e4955a 100644
--- a/ipfs-api/examples/log_tail.rs
+++ b/ipfs-api/examples/log_tail.rs
@@ -11,8 +11,8 @@ use ipfs_api::IpfsClient;
// Tails the log of IPFS.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/mfs.rs b/ipfs-api/examples/mfs.rs
index 3d6419c..85dd0f7 100644
--- a/ipfs-api/examples/mfs.rs
+++ b/ipfs-api/examples/mfs.rs
@@ -20,8 +20,8 @@ fn print_stat(stat: response::FilesStatResponse) {
// Creates an Ipfs client, and makes some calls to the Mfs Api.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/ping_peer.rs b/ipfs-api/examples/ping_peer.rs
index 2934c16..08b0496 100644
--- a/ipfs-api/examples/ping_peer.rs
+++ b/ipfs-api/examples/ping_peer.rs
@@ -12,8 +12,8 @@ use ipfs_api::{response::PingResponse, IpfsClient};
// Creates an Ipfs client, discovers a connected peer, and pings it using the
// streaming Api, and by collecting it into a collection.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/pubsub.rs b/ipfs-api/examples/pubsub.rs
index 465b86b..6fef446 100644
--- a/ipfs-api/examples/pubsub.rs
+++ b/ipfs-api/examples/pubsub.rs
@@ -25,8 +25,8 @@ fn get_client() -> IpfsClient {
// Creates an Ipfs client, and simultaneously publishes and reads from a pubsub
// topic.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: ipfs must be run with the --enable-pubsub-experiment flag");
diff --git a/ipfs-api/examples/replace_config.rs b/ipfs-api/examples/replace_config.rs
index 76cc96f..372609b 100644
--- a/ipfs-api/examples/replace_config.rs
+++ b/ipfs-api/examples/replace_config.rs
@@ -11,8 +11,8 @@ use std::io::Cursor;
// Creates an Ipfs client, and replaces the config file with the default one.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
diff --git a/ipfs-api/examples/resolve_name.rs b/ipfs-api/examples/resolve_name.rs
index 0d7b830..57ad10e 100644
--- a/ipfs-api/examples/resolve_name.rs
+++ b/ipfs-api/examples/resolve_name.rs
@@ -13,8 +13,8 @@ const IPFS_IPNS: &str = "/ipns/ipfs.io";
// Creates an Ipfs client, and resolves the Ipfs domain name, and
// publishes a path to Ipns.
//
-#[cfg_attr(feature = "actix", actix_rt::main)]
-#[cfg_attr(feature = "hyper", tokio::main)]
+#[cfg_attr(feature = "with-actix", actix_rt::main)]
+#[cfg_attr(feature = "with-hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");