stack-network-0.1.0.1: A program for extending Stack to add distributed capabilities

Copyright(c) 2018 Sean McGroarty
LicenseBSD3
MaintainerSean McGroarty <mcgroas@tcd.ie.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Distributed.Types

Description

 

Synopsis

Documentation

data AppConfig Source #

Configuration for the master node

Constructors

AppConfig 

Fields

type NetProc a = ReaderT AppConfig Process a Source #

NetProc Monad

Wraps Process with ReaderT

runNetProc :: AppConfig -> NetProc a -> Process a Source #

Run the NetProc Monad

type Node = ProcessId Source #

A Node is used for communication

type Network = [Node] Source #

A collection of Nodes

type Deps = [String] Source #

The dependecies a Node has, represented as a list of Strings

type ProcessDeps = (Deps, ProcessId) Source #

A Node and its dependencies

type FileInfo = (ByteString, ByteString) Source #

Tuple of file name and bytes

data Message Source #

All Types used messaging are derived from a Message

Constructors

Request 
Response 

data Request Source #

Only masters can make a Request

Constructors

Ping ProcessId

Used to transmit masters ProcessId to a slave

TransferReq (SendPort Transfer)

Facilitates a Transfer

Terminate

Terminates a slaves connection to the network

Instances

Generic Request Source # 

Associated Types

type Rep Request :: * -> * #

Methods

from :: Request -> Rep Request x #

to :: Rep Request x -> Request #

Binary Request Source # 

Methods

put :: Request -> Put #

get :: Get Request #

putList :: [Request] -> Put #

type Rep Request Source # 
type Rep Request = D1 * (MetaData "Request" "Network.Distributed.Types" "stack-network-0.1.0.1-GrWUNYJYzUHIeBEs3Edyel" False) ((:+:) * (C1 * (MetaCons "Ping" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ProcessId))) ((:+:) * (C1 * (MetaCons "TransferReq" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SendPort Transfer)))) (C1 * (MetaCons "Terminate" PrefixI False) (U1 *))))

data Response Source #

Only slaves can issue a Reponse in reply to a Request

Constructors

PD ProcessDeps

Response to a Ping

Transfer

Reponse to a TransferReq

Instances

Generic Response Source # 

Associated Types

type Rep Response :: * -> * #

Methods

from :: Response -> Rep Response x #

to :: Rep Response x -> Response #

Binary Response Source # 

Methods

put :: Response -> Put #

get :: Get Response #

putList :: [Response] -> Put #

type Rep Response Source # 
type Rep Response = D1 * (MetaData "Response" "Network.Distributed.Types" "stack-network-0.1.0.1-GrWUNYJYzUHIeBEs3Edyel" False) ((:+:) * (C1 * (MetaCons "PD" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ProcessDeps))) (C1 * (MetaCons "Transfer" PrefixI False) (U1 *)))

data Transfer Source #

Data-Type used in a Transfer

Constructors

TransferInProg FileInfo

Transfer In Progress

TransferDone

Informs master the Transfer is complete

Instances

Generic Transfer Source # 

Associated Types

type Rep Transfer :: * -> * #

Methods

from :: Transfer -> Rep Transfer x #

to :: Rep Transfer x -> Transfer #

Binary Transfer Source # 

Methods

put :: Transfer -> Put #

get :: Get Transfer #

putList :: [Transfer] -> Put #

type Rep Transfer Source # 
type Rep Transfer = D1 * (MetaData "Transfer" "Network.Distributed.Types" "stack-network-0.1.0.1-GrWUNYJYzUHIeBEs3Edyel" False) ((:+:) * (C1 * (MetaCons "TransferInProg" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FileInfo))) (C1 * (MetaCons "TransferDone" PrefixI False) (U1 *)))

data ProcessError Source #

Errors covering a Process failing

Constructors

SlaveError