farmbot v6.0.0 Farmbot.BotState.Lib.Partition behaviour View Source
Common functionality for parts of the bot state.
Link to this section Summary
Functions
Dispatches to the bot state tracker
Dispatches to the bot state tracker, and replies with reply
Callbacks
Optional callback for handle_call
Optional callback for handle_cast
Optional callback for handle_info
optional callback called on init
Otional callback for saveing state
Start this Partition GenServer
Link to this section Types
Link to this type
noreply()
View Source
noreply() :: {:noreply, Farmbot.BotState.Lib.Partition.PrivateState.public}
Noreply for GenServer.cast or GenServer.info.
Link to this type
reply()
View Source
reply() :: {:reply, term, Farmbot.BotState.Lib.Partition.PrivateState.public}
Reply to a GenServer.call.
Link to this type
stop()
View Source
stop :: {:stop, term, Farmbot.BotState.Lib.Partition.PrivateState.public} | {:stop, term}
Stop the Partition.
Link to this section Functions
Link to this function
dispatch(private_state)
View Source
dispatch(Farmbot.BotState.Lib.Partition.PrivateState.t) :: {:noreply, Farmbot.BotState.Lib.Partition.PrivateState.t}
Dispatches to the bot state tracker.
Link to this function
dispatch(reply, private_state)
View Source
dispatch(term, Farmbot.BotState.Lib.Partition.PrivateState.t) :: {:reply, term, Farmbot.BotState.Lib.Partition.PrivateState.t}
Dispatches to the bot state tracker, and replies with reply
Link to this section Callbacks
Link to this callback
partition_call(term, arg1, arg2)
View Source
(optional)
partition_call(term, GenServer.from, Farmbot.BotState.Lib.Partition.PrivateState.public) :: reply | noreply | stop
Optional callback for handle_call.
Link to this callback
partition_cast(term, arg1)
View Source
(optional)
partition_cast(term, Farmbot.BotState.Lib.Partition.PrivateState.public) :: noreply | stop
Optional callback for handle_cast.
Link to this callback
partition_info(term, arg1)
View Source
(optional)
partition_info(term, Farmbot.BotState.Lib.Partition.PrivateState.public) :: noreply | stop
Optional callback for handle_info.
Link to this callback
partition_init(arg0)
View Source
(optional)
partition_init(Farmbot.BotState.Lib.Partition.PrivateState.t) :: {:ok, Farmbot.BotState.Lib.Partition.PrivateState.t} | {:stop, term}
optional callback called on init.
Link to this callback
save_state(arg0)
View Source
(optional)
save_state(Farmbot.BotState.Lib.Partition.PrivateState.public) :: :ok | :error
Otional callback for saveing state.
Link to this callback
start_link(arg0, arg1)
View Source
start_link(Farmbot.BotState.server, GenServer.options) :: GenServer.on_start
Start this Partition GenServer.