2021-06-17 12:57:06 +00:00
|
|
|
version 1 .
|
2021-07-22 12:12:53 +00:00
|
|
|
embeddedType EntityRef.Cap .
|
2021-06-17 12:57:06 +00:00
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Asserts that a service should begin (and stay) running after waiting
|
|
|
|
; for its dependencies and considering reverse-dependencies, blocks,
|
|
|
|
; and so on.
|
2021-06-25 07:45:38 +00:00
|
|
|
RequireService = <require-service @serviceName any>.
|
2021-09-24 10:55:41 +00:00
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Asserts that a service should begin (and stay) running RIGHT NOW,
|
|
|
|
; without considering its dependencies.
|
2021-09-24 10:55:41 +00:00
|
|
|
RunService = <run-service @serviceName any>.
|
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Asserts one or more current states of service `serviceName`. The
|
|
|
|
; overall state of the service is the union of asserted `state`s.
|
|
|
|
;
|
|
|
|
; Only a few combinations make sense:
|
|
|
|
; - `started`
|
|
|
|
; - `started` + `ready`
|
|
|
|
; - `failed`
|
|
|
|
; - `complete`
|
|
|
|
;
|
|
|
|
ServiceState = <service-state @serviceName any @state State>.
|
2021-09-24 10:55:41 +00:00
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Possible service states.
|
|
|
|
State =
|
|
|
|
/ ; The service has begun its startup routine, and may or may not be
|
|
|
|
; ready to take requests from other parties.
|
2021-09-27 11:50:29 +00:00
|
|
|
=started
|
2021-09-27 11:48:26 +00:00
|
|
|
/ ; The service is ready to take requests from other parties.
|
|
|
|
; (This state is special in that it is asserted *in addition* to `started`.)
|
2021-09-27 11:50:29 +00:00
|
|
|
=ready
|
2021-09-27 11:48:26 +00:00
|
|
|
/ ; The service has failed.
|
2021-09-27 11:50:29 +00:00
|
|
|
=failed
|
2021-09-27 11:48:26 +00:00
|
|
|
/ ; The service has completed execution.
|
2021-09-27 11:50:29 +00:00
|
|
|
=complete
|
2021-09-27 11:48:26 +00:00
|
|
|
.
|
2021-09-24 10:55:41 +00:00
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Asserts that, when `depender` is `require-service`d, it should not
|
|
|
|
; be started until `dependee` has been asserted.
|
|
|
|
ServiceDependency = <depends-on @depender any @dependee ServiceState>.
|
2021-09-24 10:55:41 +00:00
|
|
|
|
2021-09-27 11:48:26 +00:00
|
|
|
; Asserts that the service is a "core" service. If *not* specified for
|
|
|
|
; a service X, the system acts as if `<depends-on X <service-state
|
|
|
|
; <milestone core> running>>` were asserted.
|
|
|
|
ServiceMilestone = <core-service @serviceName any>.
|