void paxos_value_pack(struct yakyak *yy, struct paxos_value *val) { msgpack_pack_array(yy->pk, 4); msgpack_pack_int(yy->pk, val->pv_dkind); msgpack_pack_paxid(yy->pk, val->pv_reqid.id); msgpack_pack_paxid(yy->pk, val->pv_reqid.gen); msgpack_pack_paxid(yy->pk, val->pv_extra); }
void paxos_header_pack(struct yakyak *yy, struct paxos_header *hdr) { msgpack_pack_array(yy->pk, 5); paxos_uuid_pack(yy, &hdr->ph_session); msgpack_pack_paxid(yy->pk, hdr->ph_ballot.id); msgpack_pack_paxid(yy->pk, hdr->ph_ballot.gen); msgpack_pack_int(yy->pk, hdr->ph_opcode); msgpack_pack_paxid(yy->pk, hdr->ph_inum); }
void paxos_acceptor_pack(struct yakyak *yy, struct paxos_acceptor *acc) { msgpack_pack_array(yy->pk, 2); msgpack_pack_paxid(yy->pk, acc->pa_paxid); msgpack_pack_raw(yy->pk, acc->pa_size); msgpack_pack_raw_body(yy->pk, acc->pa_desc, acc->pa_size); }
void paxos_paxid_pack(struct yakyak *yy, paxid_t paxid) { msgpack_pack_paxid(yy->pk, paxid); }
void paxos_paxid_pack(struct paxos_yak *py, paxid_t paxid) { msgpack_pack_paxid(py->pk, paxid); }