hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::timeout< T, Selector, Coordination > Struct Template Reference

#include "timeout.hpp"

Collaboration diagram for iroha::timeout< T, Selector, Coordination >:
Collaboration graph

Classes

struct  timeout_observer
 
struct  timeout_values
 

Public Types

typedef rxcpp::util::decay_t< T > source_value_type
 
typedef rxcpp::util::decay_t< Coordination > coordination_type
 
typedef coordination_type::coordinator_type coordinator_type
 
typedef rxcpp::util::decay_t< Selector > select_type
 

Public Member Functions

 timeout (select_type s, coordination_type coordination)
 
template<class Subscriber >
auto operator() (Subscriber dest) const -> decltype(timeout_observer< Subscriber >::make(std::move(dest), initial))
 

Public Attributes

timeout_values initial
 

Detailed Description

template<class T, class Selector, class Coordination>
struct iroha::timeout< T, Selector, Coordination >

This class is mostly the same as rxcpp::operators::timeout, the only change is that it accepts a selector lambda which generates a duration based on observable value instead of a fixed duration Return an observable that terminates with timeout_error if a particular timespan has passed without emitting another item from the source observable Timespan is generated with selector from the last received value

Template Parameters
Tvalue type
Selectorthe type of the transforming function which returns time interval
Coordinationthe type of the scheduler

Member Typedef Documentation

template<class T , class Selector , class Coordination >
typedef rxcpp::util::decay_t<Coordination> iroha::timeout< T, Selector, Coordination >::coordination_type
template<class T , class Selector , class Coordination >
typedef coordination_type::coordinator_type iroha::timeout< T, Selector, Coordination >::coordinator_type
template<class T , class Selector , class Coordination >
typedef rxcpp::util::decay_t<Selector> iroha::timeout< T, Selector, Coordination >::select_type
template<class T , class Selector , class Coordination >
typedef rxcpp::util::decay_t<T> iroha::timeout< T, Selector, Coordination >::source_value_type

Constructor & Destructor Documentation

template<class T , class Selector , class Coordination >
iroha::timeout< T, Selector, Coordination >::timeout ( select_type  s,
coordination_type  coordination 
)
inline

Member Function Documentation

template<class T , class Selector , class Coordination >
template<class Subscriber >
auto iroha::timeout< T, Selector, Coordination >::operator() ( Subscriber  dest) const -> decltype(timeout_observer<Subscriber>::make(std::move(dest), initial))
inline

Here is the call graph for this function:

Member Data Documentation

template<class T , class Selector , class Coordination >
timeout_values iroha::timeout< T, Selector, Coordination >::initial

The documentation for this struct was generated from the following file: