trace-forward-2.2.2: The forwarding protocols library for cardano node.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Trace.Forward.Protocol.TraceObject.Type

Description

The type of the trace forwarding/accepting protocol.

Synopsis

Documentation

data TraceObjectForward lo where Source #

Constructors

StIdle :: TraceObjectForward lo

Both acceptor and forwarder are in idle state. The acceptor can send a request for a list of TraceObjects (MsgTraceObjectsRequest); the forwarder is waiting for a request. It will replay with MsgTraceObjectsReply.

Node's info is an important information about the node, such as its protocol, version, start time, etc. It is assuming that the node must provide this information.

StBusy :: StBlockingStyle -> TraceObjectForward lo

The acceptor has sent a next request for TraceObjects. The acceptor is now waiting for a reply, and the forwarder is busy getting ready to send a reply with new list of TraceObjects.

There are two sub-states for this, for blocking and non-blocking cases.

StDone :: TraceObjectForward lo

Both the acceptor and forwarder are in the terminal state. They're done.

Instances

Instances details
ShowProxy lo => ShowProxy (TraceObjectForward lo :: Type) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Show (ClientHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Protocol (TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Associated Types

data Message (TraceObjectForward lo) st st' Source #

data ClientHasAgency st Source #

data ServerHasAgency st Source #

data NobodyHasAgency st Source #

Show lo => Show (Message (TraceObjectForward lo) from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ClientHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ClientHasAgency (st :: TraceObjectForward lo) where
data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) where
data NobodyHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data NobodyHasAgency (st :: TraceObjectForward lo) where
data ServerHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ServerHasAgency (st :: TraceObjectForward lo) where

data TokBlockingStyle (k :: StBlockingStyle) where Source #

The value level equivalent of StBlockingStyle.

This is also used in MsgTraceObjectsRequest where it is interpreted (and can be encoded) as a Bool with True for blocking, and False for non-blocking.

Constructors

TokBlocking :: TokBlockingStyle 'StBlocking 
TokNonBlocking :: TokBlockingStyle 'StNonBlocking 

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

Instances details
Show (Message DataPointForward from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show lo => Show (Message (TraceObjectForward lo) from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data Message DataPointForward (from :: DataPointForward) (to :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) where

data family ClientHasAgency (st :: ps) Source #

Tokens for those protocol states in which the client has agency.

data family ServerHasAgency (st :: ps) Source #

Tokens for those protocol states in which the server has agency.

Instances

Instances details
Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ServerHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data ServerHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

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

Instances details
data NobodyHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data NobodyHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data NobodyHasAgency (st :: TraceObjectForward lo) where

newtype NumberOfTraceObjects 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:

  1. From the protocol's point of view, two peers talk to each other: the forwarder and the acceptor.
  2. The forwarder is an application that collects TraceObjects and sends them to the acceptor by request (with MsgTraceObjectsReply).
  3. The acceptor is an application that receives TraceObjects from the forwarder.
  4. You can think of the acceptor as a client, and the forwarder as a server. After the connection is established, the acceptor asks for TraceObjects, the forwarder replies to it.

The acceptor will send this request to the forwarder.

Constructors

NumberOfTraceObjects 

Instances

Instances details
Generic NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Associated Types

type Rep NumberOfTraceObjects :: Type -> Type Source #

Show NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Eq NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Serialise NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

ShowProxy NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

type Rep NumberOfTraceObjects Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

type Rep NumberOfTraceObjects = D1 ('MetaData "NumberOfTraceObjects" "Trace.Forward.Protocol.TraceObject.Type" "trace-forward-2.2.2-inplace" 'True) (C1 ('MetaCons "NumberOfTraceObjects" 'PrefixI 'True) (S1 ('MetaSel ('Just "nTraceObjects") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

data BlockingReplyList (blocking :: StBlockingStyle) lo where Source #

We have requests for lists of things. In the blocking case the corresponding reply must be non-empty, whereas in the non-blocking case an empty reply is fine.

Constructors

BlockingReply :: NonEmpty lo -> BlockingReplyList 'StBlocking lo 
NonBlockingReply :: [lo] -> BlockingReplyList 'StNonBlocking lo 

Instances

Instances details
Show lo => Show (BlockingReplyList blocking lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Methods

showsPrec :: Int -> BlockingReplyList blocking lo -> ShowS Source #

show :: BlockingReplyList blocking lo -> String Source #

showList :: [BlockingReplyList blocking lo] -> ShowS Source #

Eq lo => Eq (BlockingReplyList blocking lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

Methods

(==) :: BlockingReplyList blocking lo -> BlockingReplyList blocking lo -> Bool Source #

(/=) :: BlockingReplyList blocking lo -> BlockingReplyList blocking lo -> Bool Source #