示例#1
0
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);
}
示例#2
0
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);
}
示例#3
0
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);
}
示例#4
0
void
paxos_paxid_pack(struct yakyak *yy, paxid_t paxid)
{
  msgpack_pack_paxid(yy->pk, paxid);
}
示例#5
0
void
paxos_paxid_pack(struct paxos_yak *py, paxid_t paxid)
{
  msgpack_pack_paxid(py->pk, paxid);
}