added section in core config for C client bootstrap
[OpenSRF.git] / examples / opensrf_core.xml.example
1 <?xml version='1.0'?>
2
3 <!-- Bootstrap config file for the C opensrf_stack library -->
4 <config>
5
6
7         <opensrf> <!-- bootstrap config for the C apps -->
8       <router_name>router</router_name>
9       <routers>
10          <router>127.0.0.1</router>
11       </routers>
12       <domains>
13          <domain>127.0.0.1</domain>
14       </domains>
15       <username>client</username>
16       <passwd>mypass</passwd>
17       <port>5222</port>
18       <logfile>/openils/var/log/osrfsys.log</logfile>
19       <loglevel>3</loglevel>
20    </opensrf>
21
22
23         <chopchop> <!-- Our jabber server -->
24                 <domain>127.0.0.1</domain>
25                 <secret>secret</secret>
26                 <port>5222</port>
27                 <s2sport>5269</s2sport>
28                 <listen_address>10.0.0.3</listen_address>
29                 <loglevel>3</loglevel>
30                 <logfile>/openils/var/log/jabber.log</logfile>
31         </chopchop>
32
33
34         <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
35         <gateway>
36
37                 <!--  the routers's name on the network -->
38                 <router_name>router</router_name>
39
40                 <!-- jabber domains to connect to (domain1, domain2, ...) -->
41                 <domains>
42                         <domain>127.0.0.1</domain>
43                 </domains>
44
45                 <!-- jabber login info -->
46                 <username>mylogin</username>
47                 <passwd>mypassword</passwd>
48
49                 <!-- If the port is a positive number,
50                         we will connect via TCP port, if not and unixpath is defined,
51                         we will connect via UNIX domain socket with the given path -->
52                 <port>5222</port>
53                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
54         
55                 <!-- log file location -->
56                 <logfile>/openils/var/log/gateway.log</logfile>
57                 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
58                 <loglevel>3</loglevel>
59
60         </gateway>
61
62         <rest_gateway>
63                 <router_name>router</router_name>
64                 <domains>
65                         <domain>127.0.0.1</domain>
66                 </domains>
67                 <username>mylogin</username>
68                 <passwd>mypassword</passwd>
69                 <port>5222</port>
70                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
71                 <logfile>/openils/var/log/gateway.log</logfile>
72                 <loglevel>3</loglevel>
73         </rest_gateway>
74
75         <!-- ======================================================================================== -->
76
77         <router>
78                 <component>0</component> <!-- leave disabled for now -->
79         
80                 <trusted_domains>
81                         <!-- Trusted servers are allowed to register apps with the router -->
82                         <server>127.0.0.1</server>
83                         <!-- Trusted clients are allowed to send packets through the router -->
84                         <client>127.0.0.1</client>
85                 </trusted_domains>
86         
87                 <transport>
88                         <!-- jabber server are we connecting to -->
89                         <server>127.0.0.1</server>
90                         <!-- If the port is a positive number,
91                                 we will connect via TCP port, if not and unixpath is defined,
92                                 we will connect via UNIX domain socket with the given path -->
93                         <port>5222</port>
94                         <unixpath>/openils/var/sock/unix_sock</unixpath>
95
96                         <!-- router's name on the network -->
97                         <username>router</username>
98                         <password>mypassword</password>
99                         <!-- router's jabber resource --> 
100                         <resource>router</resource>
101                         <connect_timeout>10</connect_timeout>
102                         <max_reconnect_attempts>5</max_reconnect_attempts>
103                 </transport>
104         
105                 <logfile>/openils/var/log/router.log</logfile>
106                 <loglevel>3</loglevel>
107         
108         </router>
109
110         <!-- ======================================================================================== -->
111
112 </config>
113
114
115
116