Rename layer to live
This commit is contained in:
parent
96b3b77b79
commit
49d6b6c8cc
15 changed files with 27 additions and 29 deletions
|
|
@ -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](_, _, _, _))
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lu.foyer.auth.UserInfo
|
|||
import lu.foyer.clients.*
|
||||
|
||||
object ContractHandlers:
|
||||
val layer =
|
||||
val live =
|
||||
ZLayer.fromFunction(
|
||||
(
|
||||
clientStateRepo: StateRepository[ClientState],
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue