-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from MindFlavor/docker
Docker support
- Loading branch information
Showing
6 changed files
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
extra/ | ||
target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
use clap::{Parser, Subcommand}; | ||
|
||
#[derive(Subcommand, Debug)] | ||
pub enum Commands { | ||
/// publish events to Google Cloud Pub/Sub | ||
Publish { | ||
/// Pub/sub topic to publish to | ||
#[arg(long)] | ||
pub_sub_topic: String, | ||
}, | ||
} | ||
use clap::Parser; | ||
|
||
/// Simple program to greet a person | ||
#[derive(Parser, Debug)] | ||
#[command(author, version, about, long_about = None)] | ||
pub struct Options { | ||
/// Primary instance (RW) | ||
#[arg(short, long)] | ||
#[arg(short, long, env = "PRIMARY_CONNECTION_STRING")] | ||
pub primary_connection_string: String, | ||
|
||
/// Secondary instance (RO) | ||
#[arg(short, long)] | ||
#[arg(short, long, env = "SECONDARY_CONNECTION_STRING")] | ||
pub secondary_connection_string: String, | ||
|
||
/// Sleep time in ms after each evaluation | ||
#[arg(long, default_value_t = 1000)] | ||
#[arg(long, default_value_t = 1000, env = "SLEEP_MS")] | ||
pub sleep_ms: u64, | ||
|
||
#[command(subcommand)] | ||
pub command: Option<Commands>, | ||
/// Pub/sub topic to publish to | ||
#[arg(long, env = "PUB_SUB_TOPIC")] | ||
pub pub_sub_topic: Option<String>, | ||
} |