Kagome
Polkadot Runtime Engine in C++17
|
Classes | |
struct | Failure |
class | HttpRequest |
struct | NoPayload |
class | OffchainLocalStorage |
It is revertible and fork-aware. It means that any value set by the offchain worker triggered at a certain block is reverted if that block is reverted as non-canonical. The value is NOT available for the worker that is re-run at the next or any future blocks. More... | |
class | OffchainLocalStorageImpl |
class | OffchainPersistentStorage |
It is non-revertible and not fork-aware. It means that any value set by the offchain worker is persisted even if that block (at which the worker is called) is reverted as non-canonical (meaning that the block was surpassed by a longer chain). The value is available for the worker that is re-run at the new (different block with the same block number) and future blocks. This storage can be used by offchain workers to handle forks and coordinate offchain workers running on different forks. More... | |
class | OffchainPersistentStorageImpl |
class | OffchainStorage |
class | OffchainWorker |
class | OffchainWorkerFactory |
class | OffchainWorkerFactoryImpl |
class | OffchainWorkerImpl |
class | OffchainWorkerPool |
class | OffchainWorkerPoolImpl |
struct | OpaqueNetworkState |
struct | Result |
struct | Success |
Typedefs | |
using | Timestamp = uint64_t |
Timestamp is milliseconds since UNIX Epoch. More... | |
using | RandomSeed = common::Blob< 32 > |
using | RequestId = int16_t |
using | 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 | StorageType : int32_t { StorageType::Undefined = 0, StorageType::Persistent = 1, StorageType::Local = 2 } |
enum | HttpMethod { HttpMethod::Undefined = 0, HttpMethod::Get = 1, HttpMethod::Post = 2 } |
enum | HttpError : int32_t { HttpError::Timeout = 0, HttpError::IoError = 1, HttpError::InvalidId = 2 } |
Functions | |
constexpr HttpStatus | InvalidIdentifier (0) |
constexpr HttpStatus | DeadlineHasReached (10) |
constexpr HttpStatus | ErrorHasOccurred (20) |
SCALE_EMPTY_CODER (NoPayload) | |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const OpaqueNetworkState &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, OpaqueNetworkState &v) |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
using kagome::offchain::HttpStatus = typedef 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.
using kagome::offchain::RandomSeed = typedef common::Blob<32> |
using kagome::offchain::RequestId = typedef int16_t |
using kagome::offchain::Timestamp = typedef uint64_t |
|
strong |
|
strong |
|
strong |
constexpr HttpStatus kagome::offchain::DeadlineHasReached | ( | 10 | ) |
constexpr HttpStatus kagome::offchain::ErrorHasOccurred | ( | 20 | ) |
constexpr HttpStatus kagome::offchain::InvalidIdentifier | ( | 0 | ) |
Stream& kagome::offchain::operator<< | ( | Stream & | s, |
const OpaqueNetworkState & | v | ||
) |
Stream& kagome::offchain::operator>> | ( | Stream & | s, |
OpaqueNetworkState & | v | ||
) |
kagome::offchain::SCALE_EMPTY_CODER | ( | NoPayload | ) |