Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The type of the DataPoint
forwarding/accepting protocol.
Synopsis
- type DataPointName = Text
- type DataPointValue = ByteString
- type DataPointValues = [(DataPointName, Maybe DataPointValue)]
- data DataPointForward where
- data family Message ps (st :: ps) (st' :: ps)
- data family ClientHasAgency (st :: ps)
- data family ServerHasAgency (st :: ps)
- data family NobodyHasAgency (st :: ps)
Documentation
type DataPointName = Text Source #
A kind to identify our protocol, and the types of the states in the state transition diagram of the protocol.
IMPORTANT NOTE: the following terminology is used:
- From the protocol's point of view, two peers talk to each other: the forwarder and the acceptor.
- The forwarder is an application that collects
DataPoint
s and sends them to the acceptor by request (withMsgDataPointsReply
). - The acceptor is an application that receives
DataPoint
s from the forwarder. - You can think of the acceptor as a client, and the forwarder as a server.
After the connection is established, the acceptor asks for
DataPoint
s, the forwarder replies to it.
type DataPointValue = ByteString Source #
type DataPointValues = [(DataPointName, Maybe DataPointValue)] Source #
data DataPointForward where Source #
StIdle :: DataPointForward | Both acceptor and forwarder are in idle state. The acceptor can send a
request for a list of |
StBusy :: DataPointForward | The acceptor has sent a next request for |
StDone :: DataPointForward | Both the acceptor and forwarder are in the terminal state. They're done. |
Instances
data family Message ps (st :: ps) (st' :: ps) Source #
The messages for this protocol. It is expected to be a GADT that is
indexed by the from
and to
protocol states. That is the protocol state
the message transitions from, and the protocol state it transitions into.
These are the edges of the protocol state transition system.
Instances
data family ClientHasAgency (st :: ps) Source #
Tokens for those protocol states in which the client has agency.
Instances
Show (ClientHasAgency st) Source # | |
Defined in Trace.Forward.Protocol.DataPoint.Type | |
Show (ClientHasAgency st) Source # | |
Defined in Trace.Forward.Protocol.TraceObject.Type | |
data ClientHasAgency (st :: DataPointForward) Source # | |
Defined in Trace.Forward.Protocol.DataPoint.Type | |
data ClientHasAgency (st :: TraceObjectForward lo) Source # | |
Defined in Trace.Forward.Protocol.TraceObject.Type data ClientHasAgency (st :: TraceObjectForward lo) where
|
data family ServerHasAgency (st :: ps) Source #
Tokens for those protocol states in which the server has agency.
Instances
Show (ServerHasAgency st) Source # | |
Defined in Trace.Forward.Protocol.DataPoint.Type | |
Show (ServerHasAgency st) Source # | |
Defined in Trace.Forward.Protocol.TraceObject.Type | |
data ServerHasAgency (st :: DataPointForward) Source # | |
Defined in Trace.Forward.Protocol.DataPoint.Type | |
data ServerHasAgency (st :: TraceObjectForward lo) Source # | |
Defined in Trace.Forward.Protocol.TraceObject.Type data ServerHasAgency (st :: TraceObjectForward lo) where
|
data family NobodyHasAgency (st :: ps) Source #
Tokens for terminal protocol states in which neither the client nor server has agency.
Instances
data NobodyHasAgency (st :: DataPointForward) Source # | |
Defined in Trace.Forward.Protocol.DataPoint.Type | |
data NobodyHasAgency (st :: TraceObjectForward lo) Source # | |
Defined in Trace.Forward.Protocol.TraceObject.Type data NobodyHasAgency (st :: TraceObjectForward lo) where
|