5 // This service can be induced to successfully start or fail (once it is STARTING) by calling either the
6 // started() or failed_to_start() functions.
8 class test_service : public service_record
11 test_service(service_set *set, std::string name, service_type_t type_p,
12 const std::list<prelim_dep> &deplist_p)
13 : service_record(set, name, type_p, deplist_p)
18 // Do any post-dependency startup; return false on failure
19 virtual bool bring_up() noexcept override
21 // return service_record::bring_up();
25 // All dependents have stopped.
26 virtual void bring_down() noexcept override
28 return service_record::bring_down();
31 // Whether a STARTING service can immediately transition to STOPPED (as opposed to
32 // having to wait for it reach STARTED and then go through STOPPING).
33 virtual bool can_interrupt_start() noexcept override
35 return waiting_for_deps;
38 virtual bool interrupt_start() noexcept override
43 void started() noexcept
45 service_record::started();
48 void failed_to_start() noexcept
50 service_record::failed_to_start();