services/shapes

Service shape — all fixed-branch services conform to this. The supervised flag declares whether this service needs OTP supervision. Services with supervised: True are started as permanent children of the service supervisor; services with supervised: False are used as pure modules.

Types

pub type Service {
  Service(
    name: String,
    supervised: Bool,
    start: fn() -> Result(Nil, String),
    stop: fn() -> Nil,
    health: fn() -> Bool,
  )
}

Constructors

  • Service(
      name: String,
      supervised: Bool,
      start: fn() -> Result(Nil, String),
      stop: fn() -> Nil,
      health: fn() -> Bool,
    )
Search Document