Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat connector server #120

Merged
merged 5 commits into from
Dec 20, 2023
Merged

Feat connector server #120

merged 5 commits into from
Dec 20, 2023

Conversation

giangndm
Copy link
Contributor

@giangndm giangndm commented Dec 20, 2023

This PR implement connector server, which is used to intergrate with other system like:

  • admin console
  • monitoring ..

Main idea is atm0s-media-server itseft don't do anything with hooks, logging. Instead of it will fire events to message queue like Kafka or NATS for easy extending media-server based on user business logic

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 443 lines in your changes are missing coverage. Please review.

Comparison is base (8ea8e0a) 48.62% compared to head (1f3c1b4) 47.21%.
Report is 2 commits behind head on master.

❗ Current head 1f3c1b4 differs from pull request most recent head d999d8f. Consider uploading reports for the commit d999d8f to get more accurate results

Files Patch % Lines
...rs/media-server/src/server/gateway/webrtc_route.rs 0.00% 125 Missing ⚠️
packages/endpoint/src/middleware/logger.rs 0.00% 106 Missing ⚠️
servers/media-server/src/server/gateway.rs 0.00% 43 Missing ⚠️
packages/endpoint/src/endpoint_wrap/internal.rs 28.81% 42 Missing ⚠️
servers/media-server/src/server/connector.rs 0.00% 36 Missing ⚠️
...s/media-server/src/server/connector/rpc/cluster.rs 0.00% 17 Missing ⚠️
packages/cluster/src/implement/endpoint.rs 0.00% 12 Missing ⚠️
...ervers/media-server/src/server/gateway/rpc/http.rs 0.00% 12 Missing ⚠️
packages/endpoint/src/endpoint_wrap.rs 0.00% 10 Missing ⚠️
servers/media-server/src/server/webrtc/rpc/http.rs 0.00% 9 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
- Coverage   48.62%   47.21%   -1.41%     
==========================================
  Files         124      131       +7     
  Lines       10275    10604     +329     
==========================================
+ Hits         4996     5007      +11     
- Misses       5279     5597     +318     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@giangndm giangndm marked this pull request as ready for review December 20, 2023 18:40
@giangndm giangndm merged commit 51e4228 into 8xFF:master Dec 20, 2023
6 checks passed
Comment on lines +53 to +94
match event {
TransportIncomingEvent::State(state) => match state {
TransportStateEvent::Connected => {
self.outputs.push_back(self.build_event(
now_ms,
MediaEndpointEvent::Connected {
after_ms: (now_ms - self.started_ms.expect("Should has started")) as u32,
remote: None, //TODO
},
));
}
TransportStateEvent::Reconnecting => {
self.outputs.push_back(self.build_event(
now_ms,
MediaEndpointEvent::Reconnecting {
reason: "TODO".to_string(), //TODO
},
));
}
TransportStateEvent::Reconnected => {
self.outputs.push_back(self.build_event(
now_ms,
MediaEndpointEvent::Reconnected {
remote: None, //TODO
},
));
}
TransportStateEvent::Disconnected => {
self.outputs.push_back(self.build_event(
now_ms,
MediaEndpointEvent::Disconnected {
error: None,
duration_ms: now_ms - self.started_ms.expect("Should has started"),
received_bytes: 0, //TODO
rtt: F32::new(0.0), //TODO
sent_bytes: 0, //TODO
},
));
}
},
_ => {}
}

Check warning

Code scanning / clippy

you seem to be trying to use match for destructuring a single pattern. Consider using if let Warning

you seem to be trying to use match for destructuring a single pattern. Consider using if let
This was referenced Dec 20, 2023
@giangndm giangndm deleted the feat-connector-server branch June 6, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant