@@ -35,11 +35,11 @@ Something else need to know:
35
35
36
36
# API
37
37
38
- * Create a default engine, a typical 3-stage job:
38
+ * Create default engine, a typical 3-stage job:
39
39
40
- frontend: `` os_3m_engine.ootb.StdinFrontend `` , read from stdin, send to transport stage
41
- transport: `` os_3m_engine.ootb.LogTransport `` , log data received from fronted, send to backend stage
42
- backend: `` os_3m_engine.ootb.LogBackend `` , log data received from transport
40
+ - frontend: `` os_3m_engine.ootb.StdinFrontend `` , read from stdin, send to transport stage
41
+ - transport: `` os_3m_engine.ootb.LogTransport `` , log data received from fronted, send to backend stage
42
+ - backend: `` os_3m_engine.ootb.LogBackend `` , log data received from transport
43
43
44
44
```
45
45
from os_3m_engine.launcher import create
@@ -91,8 +91,8 @@ Something else need to know:
91
91
92
92
* Custom frontend class:
93
93
94
- 1. inherit from ``os_3m_engine.core.frontend.Frontend``
95
- 2. define ``produce`` method as generator
94
+ - inherit from ``os_3m_engine.core.frontend.Frontend``
95
+ - define ``produce`` method as generator
96
96
97
97
```
98
98
from os_3m_engine.core.frontend import Frontend
@@ -104,8 +104,8 @@ Something else need to know:
104
104
105
105
* Custom transport class:
106
106
107
- 1. inherit from ``os_3m_engine.core.transport.Transport``
108
- 2. define ``transport`` method, the only parameter is the data received, the return value will be sent to backend
107
+ - inherit from ``os_3m_engine.core.transport.Transport``
108
+ - define ``transport`` method, the only parameter is the data received, the return value will be sent to backend
109
109
110
110
```
111
111
from os_3m_engine.core.transport import Transport
@@ -117,8 +117,8 @@ Something else need to know:
117
117
118
118
* Custom backend class:
119
119
120
- 1. inherit from ``os_3m_engine.core.backend.Backend``
121
- 2. define ``process`` method, the only parameter is the data received, no need return
120
+ - inherit from ``os_3m_engine.core.backend.Backend``
121
+ - define ``process`` method, the only parameter is the data received, no need return
122
122
123
123
```
124
124
from os_3m_engine.core.backend import Backend
@@ -130,8 +130,8 @@ Something else need to know:
130
130
131
131
* Passing parameters
132
132
133
- * create engine with custom config object
134
- * use ``self.config`` to get the config in stage class
133
+ - create engine with custom config object
134
+ - use ``self.config`` to get the config in stage class
135
135
136
136
```
137
137
from os_3m_engine.launcher import create
@@ -143,7 +143,8 @@ Something else need to know:
143
143
144
144
* Custom ``setup``, ``cleanup`` behavior
145
145
146
- each stage class can define ``setup``, ``cleanup`` methods, these will be called at each thread start/stop
146
+ - each stage class can define ``setup``, ``cleanup`` methods
147
+ - these will be called at each thread start/stop
147
148
148
149
149
150
```
0 commit comments