move plugins into submodules..
This commit is contained in:
18
src/Test-Carrion-TCL.hs
Normal file
18
src/Test-Carrion-TCL.hs
Normal file
@ -0,0 +1,18 @@
|
||||
{-# LANGUAGE ForeignFunctionInterface #-}
|
||||
module Main where
|
||||
import GypsFulvus.PluginStuff
|
||||
import Carrion.Plugin.TCL
|
||||
import Control.Concurrent.STM
|
||||
import Control.Concurrent
|
||||
import Control.Monad
|
||||
import qualified Data.Text as T
|
||||
main = do
|
||||
inchan <- atomically $ newTChan
|
||||
outchan <- atomically $ newTChan
|
||||
let mymanhole = Manhole inchan outchan
|
||||
initPlugin mymanhole
|
||||
let testCommand = Sewage (GenericStyleAutor (T.pack "Test Bin") (T.pack "local") (T.pack "local")) (T.pack "inspect inspect")
|
||||
atomically $ writeTChan inchan testCommand
|
||||
forever $ do
|
||||
newstuff <- atomically $ readTChan outchan
|
||||
putStrLn $ "Backend " ++ (show $ getSewageAutor newstuff) ++ " returned " ++ (T.unpack $ getSewage newstuff)
|
Reference in New Issue
Block a user