server

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommand

func GetCommand() *cobra.Command

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

func Run(availAddr, path, accountPath, fraudListenAddr string, bootnode bool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL