Rename layer to live

This commit is contained in:
Paul-Henri Froidmont 2025-11-04 14:37:21 +01:00
parent 96b3b77b79
commit 49d6b6c8cc
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
15 changed files with 27 additions and 29 deletions

View file

@ -92,5 +92,5 @@ class CommandEngine[Command, Event, State](
end CommandEngine
object CommandEngine:
def layer[Command: Tag, Event: Tag, State: Tag] =
def live[Command: Tag, Event: Tag, State: Tag] =
ZLayer.fromFunction(CommandEngine[Command, Event, State](_, _, _, _))

View file

@ -4,7 +4,7 @@ package clients
import zio.*
object ClientHandlers:
val layer: ULayer[List[CommandHandler[ClientCommand, ClientEvent, ClientState]]] =
val live: ULayer[List[CommandHandler[ClientCommand, ClientEvent, ClientState]]] =
ZLayer.succeed(
List(
CreateHandler,

View file

@ -13,4 +13,4 @@ class ClientReducer() extends Reducer[ClientEvent, ClientState]:
case (s: ClientState.Actif, _: ClientEvent.Disabled) => s.disable()
object ClientReducer:
val layer: ULayer[Reducer[ClientEvent, ClientState]] = ZLayer.succeed(ClientReducer())
val live: ULayer[Reducer[ClientEvent, ClientState]] = ZLayer.succeed(ClientReducer())

View file

@ -7,7 +7,7 @@ import lu.foyer.auth.UserInfo
import lu.foyer.clients.*
object ContractHandlers:
val layer =
val live =
ZLayer.fromFunction(
(
clientStateRepo: StateRepository[ClientState],

View file

@ -23,4 +23,4 @@ class ContractReducer() extends Reducer[ContractEvent, ContractState]:
case (s: ContractState.PendingAmendment, _: ContractEvent.Terminated) => s.terminate()
object ContractReducer:
val layer: ULayer[Reducer[ContractEvent, ContractState]] = ZLayer.succeed(ContractReducer())
val live: ULayer[Reducer[ContractEvent, ContractState]] = ZLayer.succeed(ContractReducer())