Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommand ¶
GetCommand returns a Cobra command for running the optimistic EVM rollup. It takes no arguments and returns a pointer to a cobra.Command. Example usage: cmd := GetCommand()
if err := cmd.Execute(); err != nil {
log.Fatalf("cmd.Execute error: %v", err)
}
func HandleSignals ¶
func HandleSignals(closeFn func()) error
HandleSignals is a function that handles signals sent to the console. It helps in managing the lifecycle of the server by triggering a shutdown when a termination signal is received. It takes a function to be called when a termination signal is received and returns an error if the server shutdown was not graceful. Example usage (assuming serverInstance is already defined):
if err := HandleSignals(serverInstance.Close); err != nil {
log.Fatalf("handle signal error: %v", err)
}
func Run ¶
Run initializes and starts the optimistic EVM rollup server. It takes the Avail JSON-RPC URL, a file path for the configuration file, a file path for the account mnemonic file, a fraud server listen address and a bootnode flag. It does not return a value. Example usage: Run("ws://127.0.0.1:9944/v1/json-rpc", "./configs/bootnode.yaml", "./configs/account", ":9990", false)
Types ¶
This section is empty.