-
Notifications
You must be signed in to change notification settings - Fork 302
Conversation
There's still a lot missing here, but hopefully this will help facilitate a discussion. |
https://github.com/rwl/go-endpoints hasn't been in development in 7 months. Does that matter? How about something more actively maintained like https://github.com/gorilla/mux? I'd be happy to supply a proof of concept if I have the time. |
Looking good. I'd leave implementation details out until we have something solid to implement. |
The following events are delivered to a client over a long-running HTTP stream. | ||
A client must initialize their event stream by calling Subscribe, | ||
|
||
#### Subscribe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be called Watch
, like in etcd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, depends on the implementation. Watching typically means that you're waiting for a specific event (singular), while subscribing typically means that you're just listening to events as they come in (plural).
From another perspective, if you're waiting for a game to come out, that's one event. If you're subscribed to a gamer's news feed that publishes release dates, then that's multiple events.
Do we want to translate this to something more restful? Maybe something like this?
It would be also great to follow some of the hypermedia conventions. These are a couple of links about how the github api implements this: https://developer.github.com/v3/#hypermedia |
One big thing to talk about with this: should the API directly expose the systemd/fleet directives, instead of exposing an API to push a unit to? The unit is the API, fundamentally, so writing a client would involve serializing/templating out a systemd unit, then posting it to the API. It feels like it should be more of a direct API call, like using a transient unit in systemd. |
Very glad to hear this is in the works, I could really use this. From my perspective as a newcomer to CoreOS, in an API I basically want to do what The API draft above seems to cover all of this. The only missing things I can think of:
Very excited about this turning up, very keen to get hold of it and test it when it does! |
@lukebond: to touch on your last point, systemd ships with just such an HTTP service to provide access to to the journal. I also opened #355 just yesterday to raise the question of whether we might use this within fleet. |
good to know! thanks |
@polvi can you expand a bit on what exactly you would see that looking like? What directives would it support? |
@jonboulle polvi and I talked offline. He was suggesting we offer a method of starting units like |
got it, and +1 to that - we should add |
👍 fleet rest API would be really useful. I would be into helping with a frontend for it. |
I spent the last few hours working on an actual spec: #534 |
Let's start talking about what we want out of a user-facing API.