# run: PierMesh service runner ### *class* run.Node Class that handles most of the PierMesh data [πŸ”— Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/src/run.py) #### actions Dictionary mapping methods with the action prefix to the method name after action dynamically to be called through Sponge (Sponge.base) filtering * **Type:** dict #### todo List of actions to execute * **Type:** list[dict] #### network Network map * **Type:** Network #### catch Daisy cache for catchs, our domain analog * **Type:** Catch #### cache Daisy cache for general use * **Type:** Cache #### nodeInfo Daisy (Components.daisy.Daisy) record containing some information about the node * **Type:** [Daisy](/PierMesh/piermesh/src/branch/main/docs/Daisy/Daisy.md#Daisy.Daisy.Daisy) #### onodeID PierMesh node ID * **Type:** str #### oTransceiver LoRa transceiver Transceiver * **Type:** [Transceiver](/PierMesh/piermesh/src/branch/main/docs/Transceiver/Transceiver.md#Transceiver.Transceiver.Transceiver) #### proc This process (psutil.Process), used for managing and monitoring PierMesh * **Type:** psutil.Process #### mTasks Dictionary of PierMesh service tasks * **Type:** dict #### *async* action_addPSK(data) Action to add PSK for specific node, currently unused #### *async* action_hop(data) Proxy a request to the main internet (in the future cross protocol/link) #### *async* action_initCryptography(data: dict) Initialize AES-GCM encrypted transport session #### SEE ALSO [`Cryptography.WhaleSong.Transport`](/PierMesh/piermesh/src/branch/main/docs/Cryptography/WhaleSong.md#Cryptography.WhaleSong.Transport) : End to end encryption functionality #### *async* action_map(data: dict) Map new network data to internal network map #### SEE ALSO `Siph.network.Network` : Layered graph network representation #### *async* action_routeCatch(data: dict) Route received catch to peer who requested it #### *async* action_routeHop(data: dict) Return proxy request results to requester #### *async* action_sendCatch(data: dict) Get catch and return the data to a peer #### *async* action_sendToPeer(data: dict) Send data to a peer connected to the server * **Parameters:** **data** (*dict*) – Data passed from the filter, this is a generic object so it’s similar on all actions here #### SEE ALSO `Sponge.Protocols` : Protocol based packet filtering [`Splash.serve.Server`](/PierMesh/piermesh/src/branch/main/docs/Splash/serve.md#Splash.serve.Server) : Runs a light Microdot web server with http/s and websocket functionality [`Splash.serve.Server.sendToPeer`](/PierMesh/piermesh/src/branch/main/docs/Splash/serve.md#Splash.serve.Server.sendToPeer) : Function to actually execute the action #### *async* action_syncIndex(data: dict) Add received index entries to Catch via the a remote Catch index #### *async* fsInit() Initialize the file system for use #### *async* main() Main loop, sets up the message listening, system monitoring and server running loops #### *async* monitor() Monitor and log ram and cpu usage #### *async* spongeListen() Loop to watch for tasks to do #### SEE ALSO `Sponge.base.sieve` : Packet filtering/parsing ### Notes We use a common technique here that calls the function from our preloaded actions via dictionary entry