~ne02ptzero/libfloat

ref: c93ce23cec30a46ea6bd54d341f22cb6d582bbd9 libfloat/node.h -rw-r--r-- 759 bytes
c93ce23c — Louis Solofrizzo log: Add helpers for human readable consistency types 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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;

    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 */