Skip to content

Commit d31293b

Browse files
committed
refactor: adjust pingap workspace member
1 parent b7e1a56 commit d31293b

File tree

15 files changed

+498
-392
lines changed

15 files changed

+498
-392
lines changed

Diff for: Cargo.lock

+36-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ hmac-sha512 = { version = "1.1.6", default-features = false }
4646
http = "1.2.0"
4747
humantime = "2.1.0"
4848
humantime-serde = "1.1.1"
49-
instant-acme = "0.7.2"
5049
itoa = "1.0.14"
5150
mime_guess = "2.0.5"
5251
nanoid = "0.4.0"
@@ -64,7 +63,6 @@ pingora = { git = "https://github.com/cloudflare/pingora", rev = "e6b823c5d89860
6463
"cache",
6564
] }
6665
pingora-limits = "0.4.0"
67-
rcgen = { version = "0.13.2", features = ["pem", "x509-parser"] }
6866
regex = { version = "1.11.1", default-features = false }
6967
rust-embed = { version = "8.5.0", features = [
7068
"mime-guess",
@@ -77,7 +75,6 @@ sha2 = { version = "0.10.8", default-features = false }
7775
smallvec = "1.13.2"
7876
snafu = { version = "0.8.5", features = ["std"], default-features = false }
7977
substring = "1.4.5"
80-
tempfile = "3.16.0"
8178
tokio = { version = "1.43.0", default-features = false, features = ["fs"] }
8279
toml = "0.8.19"
8380
tracing = "0.1.41"
@@ -88,7 +85,6 @@ uuid = { version = "1.12.1", features = [
8885
"std",
8986
"fast-rng",
9087
], default-features = false }
91-
x509-parser = "0.17.0"
9288
pingap-util = { path = "pingap-util" }
9389
pingap-limit = { path = "pingap-limit" }
9490
pingap-webhook = { path = "pingap-webhook" }
@@ -102,6 +98,7 @@ pingap-location = { path = "pingap-location" }
10298
pingap-state = { path = "pingap-state" }
10399
pingap-performance = { path = "pingap-performance" }
104100
pingap-logger = { path = "pingap-logger" }
101+
pingap-acme = { path = "pingap-acme" }
105102
pingap-otel = { path = "pingap-otel", optional = true }
106103
pingap-sentry = { path = "pingap-sentry", optional = true }
107104
pingap-pyroscope = { path = "pingap-pyroscope", optional = true }
@@ -165,6 +162,7 @@ members = [
165162
"pingap-otel",
166163
"pingap-sentry",
167164
"pingap-pyroscope",
165+
"pingap-acme",
168166
]
169167

170168
[workspace.dependencies]

Diff for: benches/bench.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use bytes::Bytes;
44
use criterion::{criterion_group, criterion_main, Criterion};
55
use http::{HeaderName, HeaderValue, StatusCode};
66
use nanoid::nanoid;
7-
use pingap::proxy::Parser;
87
use pingap_config::LocationConf;
98
use pingap_http_extra::{convert_headers, HttpResponse};
109
use pingap_location::Location;
10+
use pingap_logger::Parser;
1111
use pingap_state::{CompressionStat, Ctx};
1212
use pingap_util::get_super_ts;
1313
use pingora::http::{RequestHeader, ResponseHeader};

Diff for: docs/modules.md

+13
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,22 @@
22

33
```mermaid
44
graph TD
5+
acme --> certificate
6+
acme --> config
7+
acme --> http-extra
8+
acme --> service
9+
acme --> state
10+
acme --> util
11+
acme --> webhook
12+
513
cache --> config
614
cache --> service
715
cache --> util
816
917
certificate --> config
1018
certificate --> service
1119
certificate --> util
20+
certificate --> webhook
1221
1322
config --> discovery
1423
config --> util
@@ -27,7 +36,10 @@ graph TD
2736
location --> http-extra
2837
location --> util
2938
39+
logger --> config
40+
logger --> location
3041
logger --> service
42+
logger --> state
3143
logger --> util
3244
3345
performance --> cache
@@ -51,6 +63,7 @@ graph TD
5163
5264
webhook --> util
5365
66+
pingap --> acme
5467
pingap --> cache
5568
pingap --> certificate
5669
pingap --> config

Diff for: pingap-acme/Cargo.toml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[package]
2+
name = "pingap-acme"
3+
version = "0.9.10"
4+
edition = "2021"
5+
authors = ["Tree Xie <[email protected]>"]
6+
license = "Apache-2.0"
7+
homepage = "https://github.com/vicanso/pingap"
8+
repository = "https://github.com/vicanso/pingap"
9+
keywords = ["pingap", "acme"]
10+
11+
12+
[lib]
13+
name = "pingap_acme"
14+
path = "src/lib.rs"
15+
16+
[dependencies]
17+
instant-acme = "0.7.2"
18+
rcgen = { workspace = true }
19+
snafu = { workspace = true }
20+
http = { workspace = true }
21+
pingora = { workspace = true }
22+
substring = { workspace = true }
23+
tracing = { workspace = true }
24+
tokio = { workspace = true }
25+
pingap-certificate = { path = "../pingap-certificate" }
26+
pingap-config = { path = "../pingap-config" }
27+
pingap-service = { path = "../pingap-service" }
28+
pingap-util = { path = "../pingap-util" }
29+
pingap-state = { path = "../pingap-state" }
30+
pingap-http-extra = { path = "../pingap-http-extra" }
31+
pingap-webhook = { path = "../pingap-webhook" }
32+
33+
34+
[dev-dependencies]
35+
pretty_assertions = "1.4.0"
36+
tempfile = "3.16.0"
37+
tokio-test = "0.4.4"
File renamed without changes.

Diff for: src/acme/mod.rs renamed to pingap-acme/src/lib.rs

File renamed without changes.

Diff for: pingap-logger/Cargo.toml

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ snafu = { workspace = true }
1616
tracing = { workspace = true }
1717
walkdir = { workspace = true }
1818
time = { workspace = true }
19+
bytes = { workspace = true }
20+
pingora = { workspace = true }
21+
regex = { workspace = true }
22+
substring = { workspace = true }
23+
itoa = { workspace = true }
24+
tokio = { workspace = true }
25+
http = { workspace = true }
1926
tracing-subscriber = { version = "0.3.19", features = [
2027
"local-time",
2128
"json",
@@ -26,7 +33,11 @@ tracing-appender = "0.2.3"
2633
zstd = "0.13.2"
2734
pingap-service = { path = "../pingap-service" }
2835
pingap-util = { path = "../pingap-util" }
36+
pingap-state = { path = "../pingap-state" }
37+
pingap-location = { path = "../pingap-location" }
38+
pingap-config = { path = "../pingap-config" }
2939

3040

3141
[dev-dependencies]
3242
pretty_assertions = "1.4.0"
43+
tokio-test = "0.4.4"

Diff for: src/proxy/logger.rs renamed to pingap-logger/src/access.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use crate::http_extra::HOST_NAME_TAG;
1615
use bytes::BytesMut;
1716
use pingap_state::Ctx;
1817
use pingap_util::{format_byte_size, format_duration, get_hostname};
@@ -21,6 +20,8 @@ use pingora::proxy::Session;
2120
use regex::Regex;
2221
use substring::Substring;
2322

23+
pub const HOST_NAME_TAG: &[u8] = b"$hostname";
24+
2425
// Enum representing different types of log tags that can be used in the logging format
2526
#[derive(Debug, Clone, PartialEq)]
2627
pub enum TagCategory {

0 commit comments

Comments
 (0)