LCOV - code coverage report
Current view: top level - disco/events - fd_event_client.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 5 0.0 %
Date: 2026-02-13 06:06:24 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_disco_events_fd_event_client_h
       2             : #define HEADER_fd_src_disco_events_fd_event_client_h
       3             : 
       4             : #include "fd_circq.h"
       5             : #include "../keyguard/fd_keyguard_client.h"
       6             : 
       7             : #if FD_HAS_OPENSSL
       8             : #include <openssl/ssl.h>
       9             : #endif
      10             : 
      11           0 : #define FD_EVENT_CLIENT_STATE_DISCONNECTED    (0)
      12           0 : #define FD_EVENT_CLIENT_STATE_CONNECTING      (1)
      13           0 : #define FD_EVENT_CLIENT_STATE_AUTHENTICATING  (2)
      14           0 : #define FD_EVENT_CLIENT_STATE_CONFIRMING_AUTH (3)
      15           0 : #define FD_EVENT_CLIENT_STATE_CONNECTED       (4)
      16             : 
      17             : struct fd_event_client;
      18             : typedef struct fd_event_client fd_event_client_t;
      19             : 
      20             : struct fd_event_client_metrics {
      21             :   ulong transport_fail_cnt;
      22             :   ulong transport_success_cnt;
      23             :   ulong events_sent;
      24             :   ulong events_acked;
      25             :   ulong bytes_written;
      26             :   ulong bytes_read;
      27             : };
      28             : 
      29             : typedef struct fd_event_client_metrics fd_event_client_metrics_t;
      30             : 
      31             : FD_PROTOTYPES_BEGIN
      32             : 
      33             : FD_FN_CONST ulong
      34             : fd_event_client_align( void );
      35             : 
      36             : FD_FN_CONST ulong
      37             : fd_event_client_footprint( ulong buf_max );
      38             : 
      39             : void *
      40             : fd_event_client_new( void *                 shmem,
      41             :                      fd_keyguard_client_t * keyguard_client,
      42             :                      fd_rng_t *             rng,
      43             :                      fd_circq_t *           circq,
      44             :                      int                    so_sndbuf,
      45             :                      char const *           endpoint,
      46             :                      uchar const *          identity_pubkey,
      47             :                      char const *           client_version,
      48             :                      ulong                  instance_id,
      49             :                      ulong                  boot_id,
      50             :                      ulong                  machine_id,
      51             :                      ulong                  buf_max );
      52             : 
      53             : fd_event_client_t *
      54             : fd_event_client_join( void * shec );
      55             : 
      56             : fd_event_client_metrics_t const *
      57             : fd_event_client_metrics( fd_event_client_t const * client );
      58             : 
      59             : ulong
      60             : fd_event_client_state( fd_event_client_t const * client );
      61             : 
      62             : ulong
      63             : fd_event_client_id_reserve( fd_event_client_t * client );
      64             : 
      65             : void
      66             : fd_event_client_init_genesis_hash( fd_event_client_t * client,
      67             :                                    uchar const *       genesis_hash );
      68             : 
      69             : void
      70             : fd_event_client_init_shred_version( fd_event_client_t * client,
      71             :                                     ushort              shred_version );
      72             : 
      73             : void
      74             : fd_event_client_set_identity( fd_event_client_t * client,
      75             :                               uchar const *       identity_pubkey );
      76             : 
      77             : void
      78             : fd_event_client_poll( fd_event_client_t * client,
      79             :                       int *               charge_busy );
      80             : 
      81             : FD_PROTOTYPES_END
      82             : 
      83             : #endif /* HEADER_fd_src_disco_events_fd_event_client_h */

Generated by: LCOV version 1.14