From fd38572294ff4b9f8574ce1d5b5c6d9d3d35675a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 17 Aug 2023 14:30:11 +0200 Subject: [PATCH] feat: Allows to create sessions in sessions service --- Protos/V1/sessions_common.proto | 17 +++++++++++++++++ Protos/V1/sessions_service.proto | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/Protos/V1/sessions_common.proto b/Protos/V1/sessions_common.proto index d84583dfb..15609538e 100644 --- a/Protos/V1/sessions_common.proto +++ b/Protos/V1/sessions_common.proto @@ -105,3 +105,20 @@ message CancelSessionRequest { message CancelSessionResponse { SessionRaw session = 1; /** The session. */ } + +/** + * Request for creating session. + */ +message CreateSessionRequest { + TaskOptions default_task_option = 1; /** Default tasks options for tasks in the session */ + repeated string partition_ids = 2; /** List of partitions allowed during the session */ +} + +/* + Reply after session creation. + We have this reply in case of success. + When the session creation is not successful, there is an rpc exception. +*/ +message CreateSessionReply { + string session_id = 1; /** Session id of the created session if successful */ +} diff --git a/Protos/V1/sessions_service.proto b/Protos/V1/sessions_service.proto index 3675cae12..e44433f3a 100644 --- a/Protos/V1/sessions_service.proto +++ b/Protos/V1/sessions_service.proto @@ -27,4 +27,9 @@ service Sessions { * Cancel a session by its id. */ rpc CancelSession(CancelSessionRequest) returns (CancelSessionResponse) {} + + /** + * Create a session + */ + rpc CreateSession(CreateSessionRequest) returns (CreateSessionReply); }