coreos / fleet

fleet ties together systemd and etcd into a distributed init system
Apache License 2.0
2.42k stars 303 forks source link

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

Closed dongsupark closed 7 years ago

dongsupark commented 7 years ago

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:

Not sure if I've missed anything.

See also https://github.com/coreos/fleet/pull/1667#discussion_r77678587