View Source F1Bot.Replay.Options (f1_bot v0.7.0)
All options are optional unless otherwise noted.
:report_progress- If true, logs processing progress to the console.:exclude_files_regex- A regex that excludes matching.jsonStreamfiles from the download and replay, e.g. to exclude bulky*.z.jsonStreamfiles when they are not needed.:replay_while_fn- a 3-arity function that receives the current replay state, current packet and its timestamp in milliseconds. This function is called before the packet is processed. If the function returns false, the packet is left unprocessed (kept), replay is paused andstart_replay/2will return the current replay state. Replay can by resumed by callingreplay_dataset/2with the returned state and new options (e.g. differentreplay_while_fn/3).:packets_fn- a 3-arity function that receives the current replay state, current packet and its timestamp in milliseconds. This function is called for every packet and can be used to implement custom packet processing logic (e.g. to simply print all received packets to console). By default this function will process the packet usingLiveTimingHandlers.process_live_timing_packet/3and store the resultingF1Sessionstate in the replay state.:events_fn- a 1-arity function that will receive a list of events produced by default:packets_fnimplementation. This option has no effect when:packets_fnis overriden. By default:events_fnis unspecified, butMix.Tasks.Backtestfor example overrides it to broadcast events on the PubSub bus. See module docs for more details.:processing_options- a map of options that will be passed to default:packets_fn, this option has no effect when:packets_fnis overriden.