Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-plane: api on mesh itself #63

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

jakubdyszkiewicz
Copy link
Contributor

This PR adds support for
GET /meshes
GET /meshes/:name
PUT /meshes/:name
DELETE /meshes/:name

The test is basically a copy paste of the traffic resource test as I could not find proper abstraction for it.

Consumes(restful.MIME_JSON).
Produces(restful.MIME_JSON)

addToWs(ws, definitions, resourceStore, config)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turned out that if you add multiple ws with /meshes prefix. It cannot work, because
/meshes/{:name}
and
/meshes/{:name}/traffic-routes/{:name}
are converted for the same path /meshes under the hood in http.HandleFunc. That's why we have to add every resource with this prefix (which is essentially every resource) within one ws

@jakubdyszkiewicz jakubdyszkiewicz merged commit dfe55ea into master Jul 17, 2019
@yskopets yskopets deleted the feature/mesh-in-resources branch August 13, 2019 22:25
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.

None yet

2 participants