adk-go icon indicating copy to clipboard operation
adk-go copied to clipboard

Restructure the REST API packages

Open rakyll opened this issue 2 months ago • 6 comments

  • Rename server/restapi to server/adkrest to match server/adka2a.
  • Move non-public packages to internal.
  • Rename server/handlers to server/controllers because it contains controllers.
  • Name all handlers *Handler per Go convention.
  • Move AgentLoader to the agent package.

TODO: Consider moving controllers into an internal package.

rakyll avatar Nov 11 '25 05:11 rakyll

PTAL

rakyll avatar Nov 12 '25 04:11 rakyll

LGTM!

Let me know if you'd like to update this PR to hide restapi entities and expose only NewHandler(config *launcher.Config) http.Handler

dpasiukevich avatar Nov 12 '25 14:11 dpasiukevich

I'll revisit this PR to make some changes the hide more of the public surface. I'll introduce something like NewHandler as a part of the change.

rakyll avatar Nov 12 '25 18:11 rakyll

PTAL

rakyll avatar Nov 12 '25 19:11 rakyll

We will follow up with some more changes to the launchers, but this PR is ready for review.

rakyll avatar Nov 12 '25 21:11 rakyll

adk-docs /examples/go should be updated after we merge: for sure cloud-run and a2a_basic/remote_a2a/check_prime_agent, maybe more

kdroste-google avatar Nov 13 '25 11:11 kdroste-google

Can I have LGTM again? I had to rebase.

rakyll avatar Nov 13 '25 15:11 rakyll