Skip to content

Comments

feat(api): add hostEndpoint in /info#103

Merged
BlackHole1 merged 1 commit intooomol-lab:mainfrom
BlackHole1:add-host-endpoint
Apr 21, 2025
Merged

feat(api): add hostEndpoint in /info#103
BlackHole1 merged 1 commit intooomol-lab:mainfrom
BlackHole1:add-host-endpoint

Conversation

@BlackHole1
Copy link
Member

No description provided.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@BlackHole1 BlackHole1 requested review from Copilot and ihexon April 21, 2025 07:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for returning the host endpoint on the /info API endpoint. Key changes include:

  • Introducing a new function, HostEndpoint, in pkg/wsl/host.go to retrieve and cache the host endpoint.
  • Refactoring configuration key lookup in pkg/wsl/config.go to return both the value and a boolean.
  • Updating the /info API endpoint in pkg/ipc/restful/run.go to include the hostEndpoint data.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/wsl/host.go Added HostEndpoint function to fetch and cache the host endpoint with a TODO note for thread safety.
pkg/wsl/config.go Modified configuration lookup to return string values instead of booleans.
pkg/ipc/restful/run.go Extended the response structure and API logic to include hostEndpoint.

@BlackHole1 BlackHole1 merged commit f4242d8 into oomol-lab:main Apr 21, 2025
1 check passed
@BlackHole1 BlackHole1 deleted the add-host-endpoint branch April 21, 2025 07:14
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