Back to Site
Loading...
Searching...
No Matches
gossipsub.h File Reference
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <chrono>
#include <memory>
#include <functional>
#include <mutex>
#include <atomic>
#include <thread>
#include <condition_variable>
#include <random>
#include "json.hpp"
Include dependency graph for gossipsub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  librats::MessageMetadata
 Message metadata for tracking and deduplication. More...
 
struct  librats::PeerScore
 Peer scoring metrics for mesh management. More...
 
struct  librats::TopicSubscription
 Topic subscription information. More...
 
struct  librats::GossipSubConfig
 GossipSub configuration parameters. More...
 
class  librats::GossipSub
 Main GossipSub implementation class. More...
 

Namespaces

namespace  librats
 

Typedefs

using librats::MessageValidator = std::function< ValidationResult(const std::string &topic, const std::string &message, const std::string &sender_peer_id)>
 Callback types for GossipSub.
 
using librats::MessageHandler = std::function< void(const std::string &topic, const std::string &message, const std::string &sender_peer_id)>
 
using librats::PeerJoinedHandler = std::function< void(const std::string &topic, const std::string &peer_id)>
 
using librats::PeerLeftHandler = std::function< void(const std::string &topic, const std::string &peer_id)>
 

Enumerations

enum class  librats::GossipSubMessageType {
  librats::SUBSCRIBE , librats::UNSUBSCRIBE , librats::PUBLISH , librats::GOSSIP ,
  librats::GRAFT , librats::PRUNE , librats::IHAVE , librats::IWANT ,
  librats::HEARTBEAT
}
 GossipSub message types. More...
 
enum class  librats::ValidationResult { librats::ACCEPT , librats::REJECT , librats::IGNORE_MSG }
 Message validation result. More...