Skip to content

update driver to work with the new gateway#267

Open
Gioee wants to merge 2 commits into
mainfrom
mt-gateway-driver
Open

update driver to work with the new gateway#267
Gioee wants to merge 2 commits into
mainfrom
mt-gateway-driver

Conversation

@Gioee
Copy link
Copy Markdown
Member

@Gioee Gioee commented May 15, 2026

No description provided.

@Gioee Gioee requested a review from danielebriggi May 15, 2026 15:01
@Gioee Gioee self-assigned this May 15, 2026
Comment thread src/drivers/types.ts
/** Domain suffix that identifies the gateway environment. Appended to the tenant prefix
* (eg `crvheg7dhk.g4`) to form the gateway hostname the driver connects to. Default:
* `gateway.sqlite.cloud`. */
gatewayurl?: string
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Domain suffix that identifies the gateway environment: rename the gatewayUrl instead of relying on comments.
The comment is not clear about the content of the variable.

* when it already ends with the suffix (idempotent) or is too short to have a tenant prefix. */
function buildGatewayHost(host: string, gatewayurl?: string): string {
if (!host) return host
const suffix = gatewayurl || 'gateway.sqlite.cloud'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a local constant variable

Comment on lines +146 to +148
/** Builds the gateway hostname from a core hostname by replacing the last two labels with
* the given `gatewayurl` suffix (default `gateway.sqlite.cloud`). Returns host unchanged
* when it already ends with the suffix (idempotent) or is too short to have a tenant prefix. */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i admit that this comment is not clear. Just show what it does with an example. I don't know what's label is in the context of host, gatewayurl, buildGatewayUrl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants