MCPcopy Create free account
hub / github.com/Tencent/phxqueue / ReadConfig

Method ReadConfig

phxqueue/config/storeconfig.cpp:41–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39StoreConfig::~StoreConfig() {}
40
41comm::RetCode StoreConfig::ReadConfig(proto::StoreConfig &proto) {
42 QLVerb("start");
43
44 // sample
45 proto.Clear();
46
47 proto::Store *store = nullptr;
48 comm::proto::Addr *addr = nullptr;
49
50 // store 1
51 {
52 store = proto.add_stores();
53 store->set_store_id(1);
54 store->set_scale(100);
55 store->add_pub_ids(1);
56 store->add_pub_ids(2);
57
58 addr = store->add_addrs();
59 addr->set_ip("127.0.0.1");
60 addr->set_port(5100);
61 addr->set_paxos_port(5101);
62
63 addr = store->add_addrs();
64 addr->set_ip("127.0.0.1");
65 addr->set_port(5200);
66 addr->set_paxos_port(5201);
67
68 addr = store->add_addrs();
69 addr->set_ip("127.0.0.1");
70 addr->set_port(5300);
71 addr->set_paxos_port(5301);
72 }
73
74 return comm::RetCode::RET_OK;
75}
76
77
78comm::RetCode StoreConfig::Rebuild() {

Callers

nothing calls this directly

Calls 1

ClearMethod · 0.80

Tested by

no test coverage detected