api: Returns connections as part of sessions (#1714)

* session.proto: added connections to Session message

* make proto

* handler: convert connections on toProto

* updated unit test to check connections
This commit is contained in:
Thor authored and GitHub committed 2021-12-01 14:02:04 -06:00
1 parent 72d4d6d205
commit 9f7c650101
6 files changed
+390 -79

No files matched your search

@@ -23,6 +23,36 @@ message SessionState {
google.protobuf.Timestamp end_time = 30 [json_name = "end_time"];
}
// Connection contains information about a specific connection in a session
message Connection {
// public_id is used to access the connection via an API
string public_id = 1;
// session_id of the connection
string session_id = 2;
// client_tcp_address of the connection
string client_tcp_address = 3;
// client_tcp_port of the connection
uint32 client_tcp_port = 4;
// endpoint_tcp_address of the connection
string endpoint_tcp_address = 5;
// endpoint_tcp_port of the connection
uint32 endpoint_tcp_port = 6;
// bytes_up of the connection
uint64 bytes_up = 7;
// bytes_down of the connection
uint64 bytes_down = 8;
// closed_reason of the conneciont
string closed_reason = 9;
}
// Session contains all fields related to a Session resource
message Session {
// Output only. The ID of the Session.
@@ -84,4 +114,7 @@ message Session {
// Output only. The available actions on this resource for this user.
repeated string authorized_actions = 300 [json_name="authorized_actions"];
// Output only. The associated connections with this session.
repeated Connection connections = 310;
}