-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlib.rs
More file actions
56 lines (45 loc) · 1.28 KB
/
lib.rs
File metadata and controls
56 lines (45 loc) · 1.28 KB
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
55
56
use std::sync::Arc;
use defguard_version::Version;
use tokio::sync::mpsc;
use crate::proto::LogEntry;
mod acme;
pub mod assets;
pub mod config;
mod enterprise;
mod error;
pub mod grpc;
mod handlers;
pub mod http;
pub mod logging;
mod setup;
pub(crate) mod generated {
pub(crate) mod defguard {
pub(crate) mod proxy {
pub(crate) mod v2 {
tonic::include_proto!("defguard.proxy.v2");
}
}
pub(crate) mod common {
pub(crate) mod v2 {
tonic::include_proto!("defguard.common.v2");
}
}
pub mod client_types {
tonic::include_proto!("defguard.client_types");
}
}
}
pub(crate) mod proto {
pub(crate) use crate::generated::defguard::client_types::*;
pub(crate) use crate::generated::defguard::common::v2::*;
pub(crate) use crate::generated::defguard::proxy::v2::*;
}
#[macro_use]
extern crate tracing;
pub static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "+", env!("VERGEN_GIT_SHA"));
pub const MIN_CORE_VERSION: Version = Version::new(1, 6, 0);
type CommsChannel<T> = (
Arc<tokio::sync::Mutex<mpsc::Sender<T>>>,
Arc<tokio::sync::Mutex<mpsc::Receiver<T>>>,
);
type LogsReceiver = Arc<tokio::sync::Mutex<mpsc::Receiver<LogEntry>>>;