cleanup api server struct creation #3823
Labels
good first issue
Good for newcomers
Team:Elastic-Agent-Control-Plane
Label for the Agent Control Plane team
tech debt
The
api.Server
's creation signature is:This leads to test cases where we pass a lot of nil args:
We should change the signature of
NewServer
to take a struct that has the pointers to all the route handlers, i.e.,or use optional args, i.e.,
We can also try to change where we apply the handler rate-limiters to get rid of the
pathToOperation
function and clean up how the endpoints are wrapped.The text was updated successfully, but these errors were encountered: