syndicate-protocols/schemas/service.prs

52 lines
1.7 KiB
Plaintext
Raw Normal View History

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.
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-10-06 19:51:08 +00:00
; A running service publishes zero or more of these. The details of
; the object vary by service.
;
ServiceObject = <service-object @serviceName any @object any>.
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.
=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`.)
=ready
2021-09-27 11:48:26 +00:00
/ ; The service has failed.
=failed
2021-09-27 11:48:26 +00:00
/ ; The service has completed execution.
=complete
2022-02-03 21:55:06 +00:00
/ ; Extension or user-defined state
@userDefined any
2021-09-27 11:48:26 +00:00
.
2021-09-24 10:55:41 +00:00
2022-02-03 21:55:06 +00:00
; Asserts that, when `depender` is `require-service`d, it should not be started until
; `dependee` has been asserted, and also that `dependee`'s `serviceName` should be
; `require-service`d.
2021-09-27 11:48:26 +00:00
ServiceDependency = <depends-on @depender any @dependee ServiceState>.
2021-09-24 10:55:41 +00:00
2022-01-07 14:29:20 +00:00
; Message. Triggers a service restart.
RestartService = <restart-service @serviceName any>.