Skip to content
New issue

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

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

Already on GitHub? # to your account

Need a go API client implementation #260

Closed
hsanjuan opened this issue Nov 30, 2017 · 0 comments
Closed

Need a go API client implementation #260

hsanjuan opened this issue Nov 30, 2017 · 0 comments
Assignees
Labels
exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up

Comments

@hsanjuan
Copy link
Collaborator

If anything wants to integrate against cluster, this is necessary.

ipfs-cluster-ctl should leverage it. It should implement everything provided in restapi.go in terms of endpoints, and provide support for basic auth and ssl.

This is something that might be automatically generated from a good swagger spec, but I'm not sure we want to go down that way. Types are already defined in api/types.go anyway.

@hsanjuan hsanjuan added exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked labels Nov 30, 2017
@hsanjuan hsanjuan self-assigned this Dec 1, 2017
hsanjuan added a commit that referenced this issue Dec 5, 2017
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Dec 6, 2017
This adds the pakage api/rest/client which implements a go-client
for the REST API component. It also update the ipfs-cluster-ctl
tool to rely on it.

Originally, I wanted this to live it in it's own separate repository,
but the api client uses /api/types.go, which is part of cluster.

Therefore it would need to import all of cluster as a dependency.
ipfs-cluster-ctl would also need to import go-ipfs-cluster-api-client
as a dependency, creating circular gx deps which would be a mess to
maintain.

Only the splitting of cluster in multiple repositories (at least for
api, rest, ipfs-cluster-ctl, rest/client and test) would allow better
dependency management by allowing rest/client and the ctl tool
to only import what is needed, but this is something which brings
maintenance costs and can probably wait a bit until cluster is more stable.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan hsanjuan mentioned this issue Dec 6, 2017
hsanjuan added a commit that referenced this issue Dec 6, 2017
* Set default logging facility
* Remove old keep-alive comment in tests
* Use a port for TestPeersWithErrors which is not default

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Dec 7, 2017
Fix #260: Add REST API client and use it in ipfs-cluster-ctl
@ghost ghost removed the status/ready Ready to be worked label Dec 7, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

1 participant