LCOV - code coverage report
Current view: top level - disco/events - fd_event_client.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 4 0.0 %
Date: 2026-06-29 05:51:35 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             : #include "../../discof/genesis/fd_genesi_tile.h"
       7             : 
       8             : #if FD_HAS_OPENSSL
       9             : #include <openssl/ssl.h>
      10             : #endif
      11             : 
      12           0 : #define FD_EVENT_CLIENT_STATE_DISCONNECTED    (0)
      13           0 : #define FD_EVENT_CLIENT_STATE_CONNECTING      (1)
      14           0 : #define FD_EVENT_CLIENT_STATE_AUTHENTICATING  (2)
      15             : #define FD_EVENT_CLIENT_STATE_CONFIRMING_AUTH (3)
      16           0 : #define FD_EVENT_CLIENT_STATE_CONNECTED       (4)
      17             : 
      18             : struct fd_event_client;
      19             : typedef struct fd_event_client fd_event_client_t;
      20             : 
      21             : struct fd_event_client_metrics {
      22             :   ulong transport_fail_cnt;
      23             :   ulong transport_success_cnt;
      24             :   ulong events_sent;
      25             :   ulong events_acked;
      26             :   ulong last_acked_id;
      27             :   ulong bytes_written;
      28             :   ulong bytes_read;
      29             :   ulong auth_fail_cnt;
      30             :   ulong invalid_msg_cnt;
      31             :   ulong connect_attempt_cnt;
      32             :   ulong handshake_timeout_cnt;
      33             : };
      34             : 
      35             : typedef struct fd_event_client_metrics fd_event_client_metrics_t;
      36             : 
      37             : FD_PROTOTYPES_BEGIN
      38             : 
      39             : FD_FN_CONST ulong
      40             : fd_event_client_align( void );
      41             : 
      42             : FD_FN_CONST ulong
      43             : fd_event_client_footprint( ulong buf_max );
      44             : 
      45             : void *
      46             : fd_event_client_new( void *                 shmem,
      47             :                      fd_keyguard_client_t * keyguard_client,
      48             :                      fd_rng_t *             rng,
      49             :                      fd_circq_t *           circq,
      50             :                      int                    so_sndbuf,
      51             :                      char const *           endpoint,
      52             :                      uchar const *          identity_pubkey,
      53             :                      char const *           client_version,
      54             :                      char const *           commit_hash,
      55             :                      char const *           action,
      56             :                      ulong                  instance_id,
      57             :                      ulong                  boot_id,
      58             :                      ulong                  machine_id,
      59             :                      ulong                  buf_max,
      60             :                      int                    use_tls,
      61             :                      void *                 ssl_ctx );
      62             : 
      63             : fd_event_client_t *
      64             : fd_event_client_join( void * shec );
      65             : 
      66             : fd_event_client_metrics_t const *
      67             : fd_event_client_metrics( fd_event_client_t const * client );
      68             : 
      69             : ulong
      70             : fd_event_client_state( fd_event_client_t const * client );
      71             : 
      72             : ulong
      73             : fd_event_client_id_reserve( fd_event_client_t * client );
      74             : 
      75             : void
      76             : fd_event_client_init_genesis( fd_event_client_t *       client,
      77             :                               fd_genesis_meta_t const * genesis_meta );
      78             : 
      79             : void
      80             : fd_event_client_init_shred_version( fd_event_client_t * client,
      81             :                                     ushort              shred_version );
      82             : 
      83             : void
      84             : fd_event_client_set_identity( fd_event_client_t * client,
      85             :                               uchar const *       identity_pubkey );
      86             : 
      87             : void
      88             : fd_event_client_poll( fd_event_client_t * client,
      89             :                       int *               charge_busy );
      90             : 
      91             : FD_PROTOTYPES_END
      92             : 
      93             : #endif /* HEADER_fd_src_disco_events_fd_event_client_h */

Generated by: LCOV version 1.14