Skip to content

Workers service and registered tasks endpoint#5

Merged
berggren merged 1 commit intomainfrom
workers
Mar 18, 2026
Merged

Workers service and registered tasks endpoint#5
berggren merged 1 commit intomainfrom
workers

Conversation

@berggren
Copy link
Copy Markdown
Contributor

Summary

Introduced the Workers service to the Go client to support retrieving and listing registered task workers from the API.

Technical Details:

  • Service Implementation: Created a new WorkersService in workers.go that provides a Registered method to fetch task worker metadata from the /taskqueue/tasks/registered endpoint.
  • Data Models: Defined Worker and TaskConfig structs to map API responses, including support for task-specific configurations such as labels, descriptions, and default values.
  • Client Integration: Modified client.go to include the WorkersService within the main Client struct and added a Workers() accessor method for service initialization.
  • Documentation: Updated README.md with a code example demonstrating how to list registered workers and access their display names and task names.
  • Testing: Added workers_test.go containing unit tests for the Registered method, covering successful JSON decoding and API error handling.

@berggren berggren requested a review from hacktobeer March 16, 2026 14:18
@berggren berggren changed the title Add Workers service and registered tasks endpoint Workers service and registered tasks endpoint Mar 17, 2026
@berggren berggren merged commit 1872d7c into main Mar 18, 2026
3 checks passed
@berggren berggren deleted the workers branch March 18, 2026 09:13
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