Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Introduce cAPI.UnitState() for a single unit #1675

Closed
dongsupark opened this issue Sep 8, 2016 · 0 comments
Closed

Introduce cAPI.UnitState() for a single unit #1675

dongsupark opened this issue Sep 8, 2016 · 0 comments

Comments

@dongsupark
Copy link
Contributor

dongsupark commented Sep 8, 2016

At the moment cAPI doesn't support any possibility for retrieving unit states of a single unit. Instead fleet needs to call cAPI.UnitStates() to fetch states for all units, which is of course not efficient.

To support cAPI.UnitState() for a single unit, we need to do the following:

  • Add UnitState() to the API interface in client/api.go as well as to the HTTPClient in client/http.go.
  • Add a struct UnitStateGetCall and its necessary methods like Get(), Fields(), Do() in schema/v1-gen.go. Of course schema/v1-json.go needs to be regenerated.
  • Add UnitState() to the UnitRegistry interface in registry/interface.go
  • Add UnitState() also to both EtcdRegistry and RPCRegistry.
  • Add GetUnitState() to the Registry service in protobuf/fleet.proto. Of course protobuf/fleet.pb.go needs to be regenerated.

Not sure if I've missed anything.

See also #1667 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant