API JavaScript HSM Dinamo
    Preparing search index...
    import { hsm } from "@dinamonetworks/hsm-dinamo";

    const options = {
    host: "127.0.0.1",
    authUsernamePassword: {
    username: "master",
    password: "12345678",
    },
    };

    async function shutdownExample() {
    const handle = await hsm.connectPooled(options);
    await handle.disconnect();

    // Encerra só o pool desta identidade — a próxima connectPooled() para
    // ela recria o pool do zero, já sob a config atual.
    await hsm.shutdownSessionPool(options);
    console.log("Pool for this identity shut down:", hsm.getSessionPoolStats(options)); // null

    const another = await hsm.connectPooled(options);
    await another.disconnect();

    // Encerra TODOS os pools do processo — típico em process.on("SIGTERM", ...).
    await hsm.shutdownAllSessionPools();
    console.log("All pools shut down:", hsm.getAllSessionPoolStats().size); // 0
    }

    shutdownExample();