From f96d8caf1622b8494bcbc5318ac7db6e582035f5 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 13 Oct 2021 13:54:00 +0400 Subject: circleci for macos, windows and arm/x86 macos --- common/rust/src/redis.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 common/rust/src/redis.rs (limited to 'common/rust/src/redis.rs') diff --git a/common/rust/src/redis.rs b/common/rust/src/redis.rs new file mode 100644 index 0000000..a196f8d --- /dev/null +++ b/common/rust/src/redis.rs @@ -0,0 +1,15 @@ +use redis::Client; +use serde::Deserialize; + + +#[derive(Clone, Debug, Deserialize)] +pub struct RedisConfiguration { + pub url: String, +} + +// Allows the configuration to directly create a nats connection +impl Into for RedisConfiguration { + fn into(self) -> Client { + redis::Client::open(self.url).unwrap() + } +} -- cgit v1.2.3