Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
host_def Class Reference
Collaboration diagram for host_def:

Public Member Functions

 host_def ()
 
uint16_t p2p_port ()
 
uint16_t http_port ()
 
uint16_t p2p_bios_port ()
 
uint16_t http_bios_port ()
 
bool is_local () const
 
const string & dot_label ()
 

Public Attributes

string genesis
 
string ssh_identity
 
string ssh_args
 
string sysio_home
 
string host_name
 
string public_name
 
string listen_addr
 
uint16_t base_p2p_port
 
uint16_t base_http_port
 
uint16_t def_file_size
 
vector< eosd_definstances
 

Protected Member Functions

void mk_dot_label ()
 

Detailed Description

Definition at line 116 of file main.cpp.

Constructor & Destructor Documentation

◆ host_def()

host_def::host_def ( )
inline

Definition at line 118 of file main.cpp.

119 : genesis("genesis.json"),
120 ssh_identity (""),
121 ssh_args (""),
122 sysio_home(),
123 host_name("127.0.0.1"),
124 public_name("localhost"),
125 listen_addr("0.0.0.0"),
126 base_p2p_port(9876),
127 base_http_port(8888),
128 def_file_size(8192),
129 instances(),
130 p2p_count(0),
131 http_count(0),
132 dot_label_str()
133 {}
string sysio_home
Definition main.cpp:138
uint16_t base_http_port
Definition main.cpp:143
string host_name
Definition main.cpp:139
uint16_t base_p2p_port
Definition main.cpp:142
vector< eosd_def > instances
Definition main.cpp:145
string ssh_args
Definition main.cpp:137
uint16_t def_file_size
Definition main.cpp:144
string genesis
Definition main.cpp:135
string public_name
Definition main.cpp:140
string listen_addr
Definition main.cpp:141
string ssh_identity
Definition main.cpp:136

Member Function Documentation

◆ dot_label()

const string & host_def::dot_label ( )
inline

Definition at line 167 of file main.cpp.

167 {
168 if (dot_label_str.empty() ) {
169 mk_dot_label();
170 }
171 return dot_label_str;
172 }
void mk_dot_label()
Definition main.cpp:181
Here is the call graph for this function:

◆ http_bios_port()

uint16_t host_def::http_bios_port ( )
inline

Definition at line 159 of file main.cpp.

159 {
160 return base_http_port - 100;
161 }
Here is the caller graph for this function:

◆ http_port()

uint16_t host_def::http_port ( )
inline

Definition at line 151 of file main.cpp.

151 {
152 return base_http_port + http_count++;
153 }
Here is the caller graph for this function:

◆ is_local()

bool host_def::is_local ( ) const
inline

Definition at line 163 of file main.cpp.

163 {
164 return local_id.contains( host_name );
165 }
struct local_identity local_id

◆ mk_dot_label()

void host_def::mk_dot_label ( )
inlineprotected

Definition at line 181 of file main.cpp.

181 {
182 if (public_name.empty()) {
183 dot_label_str = host_name;
184 }
185 else if (boost::iequals(public_name,host_name)) {
186 dot_label_str = public_name;
187 }
188 else
189 dot_label_str = public_name + "/" + host_name;
190 }
Here is the caller graph for this function:

◆ p2p_bios_port()

uint16_t host_def::p2p_bios_port ( )
inline

Definition at line 155 of file main.cpp.

155 {
156 return base_p2p_port - 100;
157 }
Here is the caller graph for this function:

◆ p2p_port()

uint16_t host_def::p2p_port ( )
inline

Definition at line 147 of file main.cpp.

147 {
148 return base_p2p_port + p2p_count++;
149 }
Here is the caller graph for this function:

Member Data Documentation

◆ base_http_port

uint16_t host_def::base_http_port

Definition at line 143 of file main.cpp.

◆ base_p2p_port

uint16_t host_def::base_p2p_port

Definition at line 142 of file main.cpp.

◆ def_file_size

uint16_t host_def::def_file_size

Definition at line 144 of file main.cpp.

◆ genesis

string host_def::genesis

Definition at line 135 of file main.cpp.

◆ host_name

string host_def::host_name

Definition at line 139 of file main.cpp.

◆ instances

vector<eosd_def> host_def::instances

Definition at line 145 of file main.cpp.

◆ listen_addr

string host_def::listen_addr

Definition at line 141 of file main.cpp.

◆ public_name

string host_def::public_name

Definition at line 140 of file main.cpp.

◆ ssh_args

string host_def::ssh_args

Definition at line 137 of file main.cpp.

◆ ssh_identity

string host_def::ssh_identity

Definition at line 136 of file main.cpp.

◆ sysio_home

string host_def::sysio_home

Definition at line 138 of file main.cpp.


The documentation for this class was generated from the following file: