Skip to content

feat(api): add StreamLogs SSE method to workspace client#179

Closed
alexvcodesphere wants to merge 1 commit intocodesphere-cloud:mainfrom
alexvcodesphere:feat/stream-logs-api
Closed

feat(api): add StreamLogs SSE method to workspace client#179
alexvcodesphere wants to merge 1 commit intocodesphere-cloud:mainfrom
alexvcodesphere:feat/stream-logs-api

Conversation

@alexvcodesphere
Copy link
Member

Summary

Adds a StreamLogs method to api.Client that connects to the Codesphere SSE log endpoint (/workspaces/{id}/logs/{stage}/{step}) and writes parsed log entries to an io.Writer. Supports context cancellation for use with concurrent pipeline polling.

Changes

  • api/workspace.go: New StreamLogs() method + logEntry type

Testing

  • make lint: 0 issues
  • make test: all tests pass
  • make build: compiles cleanly

Signed-off-by: Alex 132889147+alexvcodesphere@users.noreply.github.com

Adds a StreamLogs method to api.Client that connects to the Codesphere
SSE log endpoint (/workspaces/{id}/logs/{stage}/{step}) and writes
parsed log entries to an io.Writer. Supports context cancellation for
use with concurrent pipeline polling.

Signed-off-by: Alex <132889147+alexvcodesphere@users.noreply.github.com>
@alexvcodesphere alexvcodesphere requested a review from a team as a code owner February 20, 2026 17:30
@alexvcodesphere
Copy link
Member Author

Reorganizing into cleaner PRs

@alexvcodesphere alexvcodesphere deleted the feat/stream-logs-api branch February 20, 2026 18:26
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.

1 participant