description.cc (795B)
1 #include "backendcheck" 2 3 string BackendCheck::description() const { 4 ostringstream o; 5 6 o << "Back end check type: "; 7 switch (check_type) { 8 case c_connect: 9 o << "TCP connect to "; 10 if (srv == "") 11 o << "backend IP, "; 12 else 13 o << "alternative IP '" << srv << "', "; 14 if (prt == 0) 15 o << "backend port"; 16 else 17 o << "alternative port '" << prt << "'"; 18 break; 19 case c_get: 20 o << "HTTP GET to "; 21 if (srv == "") 22 o << "backend IP, "; 23 else 24 o << "alternative IP '" << srv << "', "; 25 if (prt == 0) 26 o << "backend port"; 27 else 28 o << "alternative port '" << prt << "'"; 29 break; 30 case c_external: 31 o << "External program " << extprog; 32 break; 33 default: 34 throw Error("Internal jam in BackendCheck::description"); 35 } 36 37 return (o.str()); 38 } 39