Skip to content

Commit 38dc212

Browse files
committed
Merge commit '558af09830d96b69772981eb80df33adef7f94c6' into include-sub-projects
2 parents 0ec153b + 558af09 commit 38dc212

File tree

8 files changed

+353
-495
lines changed

8 files changed

+353
-495
lines changed

foundations/hulypulse/Cargo.lock

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

foundations/hulypulse/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hulypulse"
3-
version = "0.1.32"
3+
version = "0.2.1"
44
edition = "2024"
55

66
[dependencies]
@@ -30,7 +30,8 @@ tokio-stream = "0.1"
3030
strum = { version = "0.27.2", features = ["derive"] }
3131
strum_macros = "0.27.2"
3232
regorus = "0.5.0"
33-
33+
actix-ws = "0.3.0"
34+
futures-util = "0.3"
3435

3536
[[bin]]
3637
name = "hulypulse"

foundations/hulypulse/scripts/TEST.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,25 @@ <h1>WebSocket JSON Tester</h1>
6767

6868
<p>
6969

70-
<button onclick="place()" data='{"type":"info", "correlation": "abc123"}'>INFO</button>
70+
<button onclick="place()" data='{"correlation": "1", "type":"info"}'>INFO</button>
7171

72-
<button onclick="place()" data='{"type":"put", "key":"00000000-0000-0000-0000-000000000001/foo/bar1", "data": "hello 1", "TTL":5, "correlation": "abc123"}'>PUT 1</button>
73-
<button onclick="place()" data='{"type":"put", "key":"00000000-0000-0000-0000-000000000001/foo/bar2", "data": "hello 2", "TTL":9, "correlation": "abc123"}'>PUT 2</button>
72+
<button onclick="place()" data='{"correlation": "1", "type":"put", "key":"00000000-0000-0000-0000-000000000001/foo/bar1", "data": "hello 1", "TTL":5}'>PUT 1</button>
73+
<button onclick="place()" data='{"correlation": "1", "type":"put", "key":"00000000-0000-0000-0000-000000000001/foo/bar2", "data": "hello 2", "TTL":9}'>PUT 2</button>
7474

75-
<button onclick="place()" data='{"type":"delete", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>DEL 1</button>
76-
<button onclick="place()" data='{"type":"delete", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>DEL 2</button>
75+
<button onclick="place()" data='{"correlation": "1", "type":"delete", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>DEL 1</button>
76+
<button onclick="place()" data='{"correlation": "1", "type":"delete", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>DEL 2</button>
7777

78-
<button onclick="place()" data='{"type":"get", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>GET 1</button>
79-
<button onclick="place()" data='{"type":"get", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>GET 2</button>
78+
<button onclick="place()" data='{"correlation": "1", "type":"get", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>GET 1</button>
79+
<button onclick="place()" data='{"correlation": "1", "type":"get", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>GET 2</button>
8080

81-
<button onclick="place()" data='{"type":"sub", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>SUB 1</button>
82-
<button onclick="place()" data='{"type":"sub", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>SUB 2</button>
81+
<button onclick="place()" data='{"correlation": "1", "type":"sub", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>SUB 1</button>
82+
<button onclick="place()" data='{"correlation": "1", "type":"sub", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>SUB 2</button>
8383

84-
<button onclick="place()" data='{"type":"unsub", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>UNSUB 1</button>
85-
<button onclick="place()" data='{"type":"unsub", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>UNSUB 2</button>
86-
<button onclick="place()" data='{"type":"unsub", "key":"*"}'>UNSUB *</button>
84+
<button onclick="place()" data='{"correlation": "1", "type":"unsub", "key":"00000000-0000-0000-0000-000000000001/foo/bar1"}'>UNSUB 1</button>
85+
<button onclick="place()" data='{"correlation": "1", "type":"unsub", "key":"00000000-0000-0000-0000-000000000001/foo/bar2"}'>UNSUB 2</button>
86+
<button onclick="place()" data='{"correlation": "1", "type":"unsub", "key":"*"}'>UNSUB *</button>
8787

88-
<button onclick="place()" data='{"type": "sublist" }'>SUBLIST</button>
88+
<button onclick="place()" data='{"correlation": "1", "type": "sublist" }'>SUBLIST</button>
8989

9090

9191
<div id="output">Waiting for server response...</div>
@@ -110,7 +110,11 @@ <h1>WebSocket JSON Tester</h1>
110110

111111
ws.onopen = () => {
112112
pr("clear");
113-
pr("✅ WebSocket connected.");
113+
pr("✅ WebSocket connected");
114+
};
115+
116+
ws.onclose = () => {
117+
pr("❌ WebSocket closed");
114118
};
115119

116120
ws.onmessage = (e) => {

foundations/hulypulse/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub struct Config {
5858
pub no_authorization: bool,
5959

6060
pub heartbeat_timeout: u64,
61+
pub ping_timeout: u64,
6162

6263
pub policy_file: Option<String>,
6364
}

foundations/hulypulse/src/config/default.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ backend = "redis"
1313
no_authorization = false
1414

1515
heartbeat_timeout = 90
16+
ping_timeout = 30
1617

1718
# optional settings
1819
# max_size = 100

0 commit comments

Comments
 (0)