Kagome
Polkadot Runtime Engine in C++17
types.hpp File Reference
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <libp2p/multi/multiaddress.hpp>
#include <libp2p/peer/peer_id.hpp>
#include "common/blob.hpp"
#include "common/buffer.hpp"
#include "scale/scale.hpp"
Include dependency graph for types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kagome::offchain::NoPayload
 
struct  kagome::offchain::Success
 
struct  kagome::offchain::Failure
 
struct  kagome::offchain::Result< S, F >
 
struct  kagome::offchain::OpaqueNetworkState
 

Namespaces

 kagome::offchain
 

Typedefs

using kagome::offchain::Timestamp = uint64_t
 Timestamp is milliseconds since UNIX Epoch. More...
 
using kagome::offchain::RandomSeed = common::Blob< 32 >
 
using kagome::offchain::RequestId = int16_t
 
using kagome::offchain::HttpStatus = uint16_t
 HTTP status codes that can get returned by certain Offchain funcs. 0: the specified request identifier is invalid. 10: the deadline for the started request was reached. 20: an error has occurred during the request, e.g. a timeout or the remote server has closed the connection. On returning this error code, the request is considered destroyed and must be reconstructed again. 100-999: the request has finished with the given HTTP status code. More...
 

Enumerations

enum  kagome::offchain::StorageType : int32_t { kagome::offchain::StorageType::Undefined = 0, kagome::offchain::StorageType::Persistent = 1, kagome::offchain::StorageType::Local = 2 }
 
enum  kagome::offchain::HttpMethod { kagome::offchain::HttpMethod::Undefined = 0, kagome::offchain::HttpMethod::Get = 1, kagome::offchain::HttpMethod::Post = 2 }
 
enum  kagome::offchain::HttpError : int32_t { kagome::offchain::HttpError::Timeout = 0, kagome::offchain::HttpError::IoError = 1, kagome::offchain::HttpError::InvalidId = 2 }
 

Functions

constexpr HttpStatus kagome::offchain::InvalidIdentifier (0)
 
constexpr HttpStatus kagome::offchain::DeadlineHasReached (10)
 
constexpr HttpStatus kagome::offchain::ErrorHasOccurred (20)
 
 kagome::offchain::SCALE_EMPTY_CODER (NoPayload)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream & kagome::offchain::operator<< (Stream &s, const OpaqueNetworkState &v)
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream & kagome::offchain::operator>> (Stream &s, OpaqueNetworkState &v)