-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Session info #230
Session info #230
Conversation
PR missing one of the required labels: {'dependencies', 'breaking-change', 'internal', 'documentation', 'new feature', 'enhancement', 'bug'} |
/** | ||
* Class allowing to obtain the information of a [Session]. | ||
*/ | ||
class SessionInfo(private val session: Session) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using Session
instead of SessionInfo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @wyfo and @DariusIMP decide if this comment is a blocker for this PR. Otherwise it LGTM.
/** | ||
* Return the [ZenohID] of the current Zenoh [Session] | ||
*/ | ||
fun id(): Result<ZenohID> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun id(): Result<ZenohID> { | |
fun zid(): Result<ZenohID> { |
/** | ||
* Return the [ZenohID] of the zenoh peers the session is currently connected to. | ||
*/ | ||
fun peersId(): Result<List<ZenohID>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun peersId(): Result<List<ZenohID>> { | |
fun peersZid(): Result<List<ZenohID>> { |
/** | ||
* Return the [ZenohID] of the zenoh routers the session is currently connected to. | ||
*/ | ||
fun routersId(): Result<List<ZenohID>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun routersId(): Result<List<ZenohID>> { | |
fun routersZid(): Result<List<ZenohID>> { |
|
||
package io.zenoh | ||
|
||
import io.zenoh.protocol.ZenohID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZenohID
should be renamed ZenohId
to align
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened PR #233 for this, to be merged after this one.
Adding
SessionInfo
class with the following functions:fun id(): Result<ZenohID>
fun peers(): Result<List<ZenohID>>
fun routers(): Result<List<ZenohID>>
A Result.failure is returned in case of either:
Also, added the ZInfo example.