~ne02ptzero/libfloat

ref: 0a170e94a6d19b9027a52113a2ef3324b45a4dae libfloat/node.h -rw-r--r-- 812 bytes
0a170e94 — Michael Bonfils Add callback to abort snapshot synchronization 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LIBFLOAT_NODE_H
#define LIBFLOAT_NODE_H

typedef struct {
    libfloat_node_id_t  id;                     /*!< ID of this node */

    libfloat_entry_id_t next_log_to_send;       /*!< Next log to send to this node */
    libfloat_entry_id_t replicated_log;         /*!< Last known replicated log of this node */

    uint8_t             has_voted_for_me        : 1;
    uint8_t             is_up_to_date           : 1;
    uint8_t             snapshot_in_progress    : 1;

    void                *udata;                 /*!< User data */
    time_t              last_update;            /*!< Time of the last AE response (If I am the leader) */
    int                 snapshot_count;         /*!< Count of the times we are supposed to send a snapshot */
} libfloat_node_t;

#endif /* LIBFLOAT_NODE_H */