mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 10:21:51 +00:00
adds torrc endpoints
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Live.Serialize where
|
||||
|
||||
import Data.String.Interpolate.IsString
|
||||
|
||||
import Application
|
||||
import Lib.External.Registry
|
||||
import Startlude
|
||||
|
||||
someYaml :: ByteString
|
||||
someYaml = [i|
|
||||
bitcoind:
|
||||
title: "Bitcoin Core"
|
||||
description:
|
||||
short: "A Bitcoin Full Node"
|
||||
long: "The bitcoin full node implementation by Bitcoin Core."
|
||||
version-info:
|
||||
- version: 0.18.1
|
||||
release-notes: "Some stuff"
|
||||
icon-type: png
|
||||
|]
|
||||
|
||||
appRegistryTest :: IO (Either String RegistryRes)
|
||||
appRegistryTest = flip parseBsManifest someYaml <$> getAppSettings
|
||||
@@ -1,24 +0,0 @@
|
||||
module Live.UpdateAgent where
|
||||
|
||||
import Application
|
||||
import Lib.Types.StoreApp
|
||||
import Lib.UpdateAgent
|
||||
import Startlude
|
||||
|
||||
av :: AppVersion
|
||||
av = AppVersion (0,0,0)
|
||||
|
||||
avs :: AppVersionSpecification
|
||||
avs = AppVersionSpecification SVEquals av
|
||||
|
||||
-- Need a few things to run this...
|
||||
-- 1) a running "registry" server, pointed to by the settings.yml this file is run against.
|
||||
-- 2) that server needs to serve up an executable file at /agent.0.0.0 (the version of av above)
|
||||
-- 3) the executable file must itself spin up a server on the same port as this application, defined again in settings.yml
|
||||
-- 4) that server must also respond to /version with a semver version in the format "0.0.0"
|
||||
-- 5) If all goes well, the stack ghci session which calls updateAgentLive should have been killed, and the executable should still be running
|
||||
|
||||
updateAgentLive :: IO ()
|
||||
updateAgentLive = do
|
||||
(_, agentCtx, _) <- getApplicationRepl
|
||||
updateAgent' avs agentCtx
|
||||
Reference in New Issue
Block a user