working on documentation; finished upper structure

This commit is contained in:
2024-11-21 21:58:23 +00:00
parent 95620ba509
commit 5394e8a657
2 changed files with 27 additions and 9 deletions

View File

@@ -39,6 +39,7 @@ instance FromJSON MapPortResponse where
-- | Host P2prc configuration
newtype P2prcConfig = MkP2prConfig
{ machineName :: String
-- , iPTable :: String -- File

View File

@@ -5,12 +5,13 @@
Module : P2PRC
Copyright : Copyright (C) 2024-2024 Jose Fernandes
License : GNU GPL, version 2 or above
Maintainer : Jose Fernandes <jf94.uk@gmail.com>
Stability : beta
Portability : portable
This helper module exports the main functions and data type definitions necessary to get started with the P2PRC api.
This library provides an interface to the P2Prc runtime.
This Module intends to export the main functions and data type definitions necessary to get started with the P2PRC api.
A minimal application will require the import of 'runP2PRC' function that accepts a 'MapPortRequest' value that exposes a specific port number and associates it with a domain name in the internet.
@@ -23,8 +24,6 @@ This is a small template to get quickly get started with this interface. We assu
> , MapPortRequest(MkMapPortRequest)
> )
>
>
>
> main :: IO ()
> main =
> runP2PRC
@@ -35,14 +34,32 @@ This is a small template to get quickly get started with this interface. We assu
module P2PRC
( getP2prcAPI
, runP2PRC
, MapPortRequest(..)
(
-- * Functions
{- | These are the available functions available to interact with the P2Prc environment, at a lower level of abstraction.
It is intended this way to give freedom to the developer to implement their own orchestration strategies.
-}
runP2PRC
, getP2prcAPI
-- * Data Types
{- | This section describes and explains the library's type system, more specifically, the interfaces and primitive types.
-}
-- ** Interface data types
-- | This section gives an overview on the runtime and host machine interfaces.
, P2PRCapi
, IPAdressTable
, MapPortResponse
, P2prcConfig
-- ** Primitive data types
-- | These types represent the core data that is communicated between requests and the runtime.
, IPAdressTable
, MapPortRequest(..)
, MapPortResponse
, Error
-- ** Type Synonyms
-- | This section is reserved to some useful type synonyms that add significant ergonomics.
, IOEitherError
)
where