Copyright | (c) Kevin Quick 2016 2017 |
---|---|
License | BSD-3 |
Maintainer | quick@sparq.org |
Stability | stable |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell98 |
The OnRmt library provides functionality for a tool that can be used to perform operations via SSH to multiple remote machines in parallel and report the results. Multiple operations can be performed in succession. OnRmt can be likened to an interactive version of Fabric, written in Haskell.
The UI is extensible and OnRmt comes with a command-line representation (CLI) and a text user interface (TUI) based on itemfield, brick, and vty.
OnRmt is provided as a library but is fully complete and lacks only an invocation from a main function with the set of known remote SSH nodes.
- class WorkEntry a where
- class WorkEntry (GroupEntry g) => WorkGroup g where
- type GroupEntry g
- data WorkItems
- data WorkMsg
- data WorkControls = WorkControls {
- numParallel :: Int
- useDirectSSH :: Bool
- queryResponses :: [Text]
- data StateCmd
- = NewItems [WorkItems] (Maybe (WorkId -> WorkState -> Text))
- | ResetUI
- | ChgState WorkState WorkId
- | DisplaySet DispBlk
- | DisplayAdd DispBlk
- | SetProgress Text Int
- | LogInfo Text
- | EndOfInformation
- data DispBlk
- type WorkId = Int
- data WorkState
- data OnRmtParams = OnRmtParams {}
- onRmt :: (WorkGroup a, OnRmtUI ui uistate, Show uistate) => IO a -> OnRmtParams -> ui -> (StateCmd -> IO ()) -> uistate -> IO uistate
Exports from Concurrent.Worker
class WorkEntry (GroupEntry g) => WorkGroup g where Source #
type GroupEntry g Source #
data WorkControls Source #
WorkControls | |
|
Main Parameters and entrypoint
data OnRmtParams Source #
The OnRmtParams data structure specifies the operational parameters for running OnRmt. These fields can be adjusted by the client as desired.
OnRmtParams | |
|
onRmt :: (WorkGroup a, OnRmtUI ui uistate, Show uistate) => IO a -> OnRmtParams -> ui -> (StateCmd -> IO ()) -> uistate -> IO uistate Source #
The onRmt function is the main entry point. It creates the vty-ui interface and provides the main operational loop for user interaction and remote operations.