Skip to content

Commit 7ead79c

Browse files
committed
update doc
1 parent b4805ef commit 7ead79c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,26 @@ python binding for f-stack
77
run `python setup.py install`
88

99
## documentation
10+
pyfstack exports four modules: `fstack`, `socket`, `select`, `fcntl`.
11+
12+
### fstack
13+
this module used to init f-stack and run loop function.
14+
#### Fstack Objects
15+
`fstack.Fstack(config_file, proc_type, proc_id)`
16+
17+
Constructor of `fstack.Fstack` class, the arguments are same as `ff_init`
18+
+ `run(fn, *args, **kwargs)`: run the loop callback, `args` and `kwargs` is the arguments of `fn`
19+
20+
you can use the following code to init f-stack and run the loop callback
21+
22+
ffobj = fstack.Fstack(conf, proc_type, proc_id)
23+
ffobj.run(loop_cb, arg1, ...)
24+
25+
### socket
26+
similar to the builtin `socket` module
27+
28+
### select
29+
similar to the builtin `select` module
30+
31+
### fcntl
32+
similar to the builtin `fcntl` module

0 commit comments

Comments
 (0)