Skip to content
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

Support a session manager to manage connection with same SPACE #215

Open
horoc opened this issue Jul 27, 2022 · 0 comments
Open

Support a session manager to manage connection with same SPACE #215

horoc opened this issue Jul 27, 2022 · 0 comments
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@horoc
Copy link

horoc commented Jul 27, 2022

In java client, user can use a session manager to specify SPACE when getting a session, so why go-client doesn't support that feature, since it's maybe a common requirement of client.

SessionsManagerConfig config = new SessionsManagerConfig();
NebulaPoolConfig poolConfig = new NebulaPoolConfig();
poolConfig.setMaxConnSize(4);
config.setAddresses(Collections.singletonList(
    new HostAddress("127.0.0.1", 9670)))
    .setUserName("root")
    .setPassword("nebula")
    .setSpaceName("space")
    .setPoolConfig(poolConfig);
SessionsManager sessionsManager = new SessionsManager(config);
// Gets the session of the specified space
SessionWrapper session = sessionsManager.getSessionWrapper();
ResultSet resultSet = session.execute("......");
@Sophie-Xie Sophie-Xie added the type/enhancement Type: make the code neat or more efficient label Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

2 participants