-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
Codecov ReportAttention:
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. |
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
This PR implement connector server, which is used to intergrate with other system like:
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