Host Manager

interface HostManager

The HostManager interface is used to manage the hosts with their status and persistence in the system

Author

N7ghtm4r3 - Tecknobit

Inheritors

Properties

Link copied to clipboard
abstract var requestsScope: CoroutineScope

requestsScope the CoroutineScope used to make the requests to the backend

Functions

Link copied to clipboard
open fun handleHostStatus(host: SavedHost, onStatusChange: (HostStatus) -> Unit)

Method used to handle the status of the host such online or offline

Link copied to clipboard
open fun rebootHost(host: SavedHost, onStatusChange: () -> Unit)

Method used to reboot a host

Link copied to clipboard
abstract fun showFailure(error: JsonObject)

Method used to display an eventual occurred error

Link copied to clipboard
open fun unregisterHost(host: SavedHost, onSuccess: () -> Unit)

Method used to unregister a host from the session