moved router, gateways to a single config file opensrf_core.xml
[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         <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
7         <gateway>
8
9                 <!--  the routers's name on the network -->
10                 <router_name>router</router_name>
11
12                 <!-- jabber domains to connect to (domain1, domain2, ...) -->
13                 <domains>
14                         <domain1>127.0.0.1</domain1>
15                 </domains>
16
17                 <!-- jabber login info -->
18                 <username>mylogin</username>
19                 <passwd>mypassword</passwd>
20
21                 <!-- If the port is a positive number,
22                         we will connect via TCP port, if not and unixpath is defined,
23                         we will connect via UNIX domain socket with the given path -->
24                 <port>5222</port>
25                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
26         
27                 <!-- log file location -->
28                 <logfile>/openils/var/log/gateway.log</logfile>
29                 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
30                 <loglevel>3</loglevel>
31
32         </gateway>
33
34         <rest_gateway>
35                 <router_name>router</router_name>
36                 <domains>
37                         <domain1>127.0.0.1</domain1>
38                 </domains>
39                 <username>mylogin</username>
40                 <passwd>mypassword</passwd>
41                 <port>5222</port>
42                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
43                 <logfile>/openils/var/log/gateway.log</logfile>
44                 <loglevel>3</loglevel>
45         </rest_gateway>
46
47
48         <!-- ======================================================================================== -->
49
50         <router>
51                 <component>0</component> <!-- leave disabled for now -->
52         
53                 <trusted_domains>
54                         <!-- Trusted servers are allowed to register apps with the router -->
55                         <server1>127.0.0.1</server1>
56                         <!-- Trusted clients are allowed to send packets through the router -->
57                         <client1>127.0.0.1</client1>
58                 </trusted_domains>
59         
60                 <transport>
61                         <!-- jabber server are we connecting to -->
62                         <server>127.0.0.1</server>
63                         <!-- If the port is a positive number,
64                                 we will connect via TCP port, if not and unixpath is defined,
65                                 we will connect via UNIX domain socket with the given path -->
66                         <port>5222</port>
67                         <unixpath>/openils/var/sock/unix_sock</unixpath>
68
69                         <!-- router's name on the network -->
70                         <username>router</username>
71                         <password>mypassword</password>
72                         <!-- router's jabber resource --> 
73                         <resource>router</resource>
74                         <connect_timeout>10</connect_timeout>
75                         <max_reconnect_attempts>5</max_reconnect_attempts>
76                 </transport>
77         
78                 <logfile>/openils/var/log/router.log</logfile>
79                 <loglevel>3</loglevel>
80         
81         </router>
82
83         <!-- ======================================================================================== -->
84
85 </config>
86
87
88
89