-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3490b0
commit 31ef149
Showing
56 changed files
with
6,238 additions
and
1,431 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# GraphScope Coordinator | ||
|
||
The GraphScope Coordinator serves as a centralized entry point for users, providing a RESTful API that follows the Swagger specification. It supports multiple language SDKs, including Python, and offers a unified interface. The main purpose of the Coordinator is to abstract and standardize the underlying engines and storage systems, shielding users from their complexities. This allows users to interact with the GraphScope platform through a simplified and consistent set of APIs, making it easier for users to understand and utilize the functionalities provided by GraphScope. | ||
|
||
```{toctree} arguments | ||
--- | ||
caption: | ||
maxdepth: 2 | ||
--- | ||
coordinator/restful_api | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Coordinator RESTFul API | ||
----------------------- | ||
|
||
.. raw:: html | ||
|
||
<div style="display:flex;height:calc(100vh - 200px);width:100%"><iframe style="flex:1;height:100%;width:100%" src="../../_static/coordinator_restful_api.html">Coordinator RESTFul API</iframe></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 0 additions & 98 deletions
98
flex/coordinator/gs_flex_coordinator/controllers/procedure_controller.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
flex/coordinator/gs_flex_coordinator/controllers/stored_procedure_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import connexion | ||
from typing import Dict | ||
from typing import Tuple | ||
from typing import Union | ||
|
||
from gs_flex_coordinator.models.create_stored_proc_request import CreateStoredProcRequest # noqa: E501 | ||
from gs_flex_coordinator.models.create_stored_proc_response import CreateStoredProcResponse # noqa: E501 | ||
from gs_flex_coordinator.models.error import Error # noqa: E501 | ||
from gs_flex_coordinator.models.get_stored_proc_response import GetStoredProcResponse # noqa: E501 | ||
from gs_flex_coordinator.models.update_stored_proc_request import UpdateStoredProcRequest # noqa: E501 | ||
from gs_flex_coordinator import util | ||
|
||
from gs_flex_coordinator.core import client_wrapper | ||
from gs_flex_coordinator.core import handle_api_exception | ||
|
||
|
||
@handle_api_exception() | ||
def create_stored_procedure(graph_id, create_stored_proc_request): # noqa: E501 | ||
"""create_stored_procedure | ||
Create a new stored procedure on a certain graph # noqa: E501 | ||
:param graph_id: | ||
:type graph_id: str | ||
:param create_stored_proc_request: | ||
:type create_stored_proc_request: dict | bytes | ||
:rtype: Union[CreateStoredProcResponse, Tuple[CreateStoredProcResponse, int], Tuple[CreateStoredProcResponse, int, Dict[str, str]] | ||
""" | ||
if connexion.request.is_json: | ||
create_stored_proc_request = CreateStoredProcRequest.from_dict(connexion.request.get_json()) # noqa: E501 | ||
return client_wrapper.create_stored_procedure(graph_id, create_stored_proc_request) | ||
|
||
|
||
@handle_api_exception() | ||
def delete_stored_procedure_by_id(graph_id, stored_procedure_id): # noqa: E501 | ||
"""delete_stored_procedure_by_id | ||
Delete a stored procedure by ID # noqa: E501 | ||
:param graph_id: | ||
:type graph_id: str | ||
:param stored_procedure_id: | ||
:type stored_procedure_id: str | ||
:rtype: Union[str, Tuple[str, int], Tuple[str, int, Dict[str, str]] | ||
""" | ||
return client_wrapper.delete_stored_procedure_by_id(graph_id, stored_procedure_id) | ||
|
||
|
||
@handle_api_exception() | ||
def get_stored_procedure_by_id(graph_id, stored_procedure_id): # noqa: E501 | ||
"""get_stored_procedure_by_id | ||
Get a stored procedure by ID # noqa: E501 | ||
:param graph_id: | ||
:type graph_id: str | ||
:param stored_procedure_id: | ||
:type stored_procedure_id: str | ||
:rtype: Union[GetStoredProcResponse, Tuple[GetStoredProcResponse, int], Tuple[GetStoredProcResponse, int, Dict[str, str]] | ||
""" | ||
return client_wrapper.get_stored_procedure_by_id(graph_id, stored_procedure_id) | ||
|
||
|
||
@handle_api_exception() | ||
def list_stored_procedures(graph_id): # noqa: E501 | ||
"""list_stored_procedures | ||
List all stored procedures on a certain graph # noqa: E501 | ||
:param graph_id: | ||
:type graph_id: str | ||
:rtype: Union[List[GetStoredProcResponse], Tuple[List[GetStoredProcResponse], int], Tuple[List[GetStoredProcResponse], int, Dict[str, str]] | ||
""" | ||
return client_wrapper.list_stored_procedures(graph_id) | ||
|
||
|
||
@handle_api_exception() | ||
def update_stored_procedure_by_id(graph_id, stored_procedure_id, update_stored_proc_request=None): # noqa: E501 | ||
"""update_stored_procedure_by_id | ||
Update a stored procedure by ID # noqa: E501 | ||
:param graph_id: | ||
:type graph_id: str | ||
:param stored_procedure_id: | ||
:type stored_procedure_id: str | ||
:param update_stored_proc_request: | ||
:type update_stored_proc_request: dict | bytes | ||
:rtype: Union[str, Tuple[str, int], Tuple[str, int, Dict[str, str]] | ||
""" | ||
if connexion.request.is_json: | ||
update_stored_proc_request = UpdateStoredProcRequest.from_dict(connexion.request.get_json()) # noqa: E501 | ||
return client_wrapper.update_stored_procedure_by_id(graph_id, stored_procedure_id, update_stored_proc_request) |
Oops, something went wrong.