nutcracker 0.2.4.5 → 0.2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/nutcracker/ChangeLog +0 -0
- data/ext/nutcracker/LICENSE +0 -0
- data/ext/nutcracker/Makefile.am +0 -0
- data/ext/nutcracker/Makefile.in +190 -82
- data/ext/nutcracker/NOTICE +0 -0
- data/ext/nutcracker/README.md +0 -0
- data/ext/nutcracker/aclocal.m4 +231 -122
- data/ext/nutcracker/conf/nutcracker.leaf.yml +0 -0
- data/ext/nutcracker/conf/nutcracker.root.yml +0 -0
- data/ext/nutcracker/conf/nutcracker.yml +0 -0
- data/ext/nutcracker/config.h.in +0 -15
- data/ext/nutcracker/config/config.guess +278 -248
- data/ext/nutcracker/config/config.sub +234 -77
- data/ext/nutcracker/config/depcomp +143 -39
- data/ext/nutcracker/config/install-sh +136 -116
- data/ext/nutcracker/config/ltmain.sh +1704 -788
- data/ext/nutcracker/config/missing +29 -65
- data/ext/nutcracker/configure +1998 -1052
- data/ext/nutcracker/configure.ac +2 -34
- data/ext/nutcracker/contrib/Makefile.am +0 -0
- data/ext/nutcracker/contrib/Makefile.in +120 -47
- data/ext/nutcracker/contrib/yaml-0.1.4.tar.gz +0 -0
- data/ext/nutcracker/extconf.rb +5 -2
- data/ext/nutcracker/m4/libtool.m4 +960 -396
- data/ext/nutcracker/m4/ltoptions.m4 +17 -2
- data/ext/nutcracker/m4/ltversion.m4 +6 -6
- data/ext/nutcracker/notes/c-styleguide.txt +0 -0
- data/ext/nutcracker/notes/debug.txt +0 -0
- data/ext/nutcracker/notes/memcache.txt +0 -0
- data/ext/nutcracker/notes/recommendation.md +0 -0
- data/ext/nutcracker/notes/redis.md +0 -0
- data/ext/nutcracker/notes/socket.txt +0 -0
- data/ext/nutcracker/scripts/nutcracker.init +0 -0
- data/ext/nutcracker/scripts/nutcracker.spec +0 -0
- data/ext/nutcracker/scripts/redis-check.py +0 -0
- data/ext/nutcracker/src/Makefile.am +1 -1
- data/ext/nutcracker/src/Makefile.in +167 -81
- data/ext/nutcracker/src/hashkit/Makefile.am +0 -0
- data/ext/nutcracker/src/hashkit/Makefile.in +72 -37
- data/ext/nutcracker/src/hashkit/nc_crc16.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_crc32.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_fnv.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_hashkit.h +0 -0
- data/ext/nutcracker/src/hashkit/nc_hsieh.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_jenkins.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_ketama.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_md5.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_modula.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_murmur.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_one_at_a_time.c +0 -0
- data/ext/nutcracker/src/hashkit/nc_random.c +0 -0
- data/ext/nutcracker/src/nc.c +0 -0
- data/ext/nutcracker/src/nc_array.c +0 -0
- data/ext/nutcracker/src/nc_array.h +0 -0
- data/ext/nutcracker/src/nc_client.c +0 -0
- data/ext/nutcracker/src/nc_client.h +0 -0
- data/ext/nutcracker/src/nc_conf.c +0 -0
- data/ext/nutcracker/src/nc_conf.h +0 -0
- data/ext/nutcracker/src/nc_connection.c +0 -0
- data/ext/nutcracker/src/nc_connection.h +0 -0
- data/ext/nutcracker/src/nc_core.c +26 -29
- data/ext/nutcracker/src/nc_core.h +5 -13
- data/ext/nutcracker/src/{nc_epoll.c → nc_event.c} +30 -94
- data/ext/nutcracker/src/nc_event.h +13 -33
- data/ext/nutcracker/src/nc_log.c +0 -0
- data/ext/nutcracker/src/nc_log.h +0 -0
- data/ext/nutcracker/src/nc_mbuf.c +0 -0
- data/ext/nutcracker/src/nc_mbuf.h +0 -0
- data/ext/nutcracker/src/nc_message.c +0 -0
- data/ext/nutcracker/src/nc_message.h +0 -0
- data/ext/nutcracker/src/nc_proxy.c +8 -8
- data/ext/nutcracker/src/nc_proxy.h +0 -0
- data/ext/nutcracker/src/nc_queue.h +0 -0
- data/ext/nutcracker/src/nc_rbtree.c +0 -0
- data/ext/nutcracker/src/nc_rbtree.h +0 -0
- data/ext/nutcracker/src/nc_request.c +3 -3
- data/ext/nutcracker/src/nc_response.c +6 -4
- data/ext/nutcracker/src/nc_server.c +5 -5
- data/ext/nutcracker/src/nc_server.h +0 -0
- data/ext/nutcracker/src/nc_signal.c +0 -0
- data/ext/nutcracker/src/nc_signal.h +0 -0
- data/ext/nutcracker/src/nc_stats.c +21 -16
- data/ext/nutcracker/src/nc_stats.h +4 -3
- data/ext/nutcracker/src/nc_string.c +0 -0
- data/ext/nutcracker/src/nc_string.h +0 -0
- data/ext/nutcracker/src/nc_util.c +0 -16
- data/ext/nutcracker/src/nc_util.h +0 -1
- data/ext/nutcracker/src/proto/Makefile.am +0 -0
- data/ext/nutcracker/src/proto/Makefile.in +72 -37
- data/ext/nutcracker/src/proto/nc_memcache.c +0 -0
- data/ext/nutcracker/src/proto/nc_proto.h +0 -0
- data/ext/nutcracker/src/proto/nc_redis.c +0 -0
- data/lib/nutcracker/version.rb +1 -1
- metadata +3 -200
- data/ext/nutcracker/Makefile +0 -643
- data/ext/nutcracker/autom4te.cache/output.0 +0 -18664
- data/ext/nutcracker/autom4te.cache/output.1 +0 -18664
- data/ext/nutcracker/autom4te.cache/output.2 +0 -18664
- data/ext/nutcracker/autom4te.cache/requests +0 -494
- data/ext/nutcracker/autom4te.cache/traces.0 +0 -2415
- data/ext/nutcracker/autom4te.cache/traces.1 +0 -945
- data/ext/nutcracker/autom4te.cache/traces.2 +0 -2415
- data/ext/nutcracker/config.h +0 -332
- data/ext/nutcracker/config.log +0 -2684
- data/ext/nutcracker/config.status +0 -2317
- data/ext/nutcracker/contrib/Makefile +0 -494
- data/ext/nutcracker/contrib/yaml-0.1.4/Makefile +0 -736
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +0 -13102
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +0 -13085
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2 +0 -13085
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +0 -476
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0 +0 -2339
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +0 -545
- data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +0 -2339
- data/ext/nutcracker/contrib/yaml-0.1.4/config.h +0 -81
- data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/config.log +0 -688
- data/ext/nutcracker/contrib/yaml-0.1.4/config.status +0 -2032
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/annotated.html +0 -51
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/bc_s.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/classes.html +0 -41
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/closed.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.css +0 -656
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/files.html +0 -40
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions.html +0 -91
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x62.html +0 -84
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x63.html +0 -87
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x64.html +0 -83
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x65.html +0 -110
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x66.html +0 -79
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x68.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x69.html +0 -92
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6b.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6c.html +0 -88
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6d.html +0 -96
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6e.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6f.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x70.html +0 -100
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x71.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x72.html +0 -87
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x73.html +0 -163
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x74.html +0 -115
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x75.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x76.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x77.html +0 -77
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars.html +0 -91
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x62.html +0 -84
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x63.html +0 -87
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x64.html +0 -83
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x65.html +0 -110
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x66.html +0 -79
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x68.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x69.html +0 -92
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6b.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6c.html +0 -88
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6d.html +0 -96
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6e.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6f.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x70.html +0 -100
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x71.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x72.html +0 -87
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x73.html +0 -163
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x74.html +0 -115
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x75.html +0 -71
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x76.html +0 -80
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x77.html +0 -77
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals.html +0 -667
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_defs.html +0 -81
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_enum.html +0 -78
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_eval.html +0 -373
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_func.html +0 -196
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_type.html +0 -126
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__basic.html +0 -320
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__emitter.html +0 -819
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__events.html +0 -664
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__export.html +0 -60
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__nodes.html +0 -795
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__parser.html +0 -606
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__styles.html +0 -222
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__tokens.html +0 -246
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__version.html +0 -106
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/index.html +0 -31
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/modules.html +0 -42
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_f.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_h.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/open.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__alias__data__s.html +0 -108
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__document__s.html +0 -235
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__emitter__s.html +0 -1300
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__event__s.html +0 -496
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__mark__s.html +0 -108
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__pair__s.html +0 -91
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__s.html +0 -420
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__parser__s.html +0 -1229
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__simple__key__s.html +0 -97
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__tag__directive__s.html +0 -91
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__token__s.html +0 -413
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__version__directive__s.html +0 -91
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_a.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_b.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_h.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_s.png +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tabs.css +0 -59
- data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/yaml_8h.html +0 -525
- data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.am +0 -17
- data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.in +0 -470
- data/ext/nutcracker/contrib/yaml-0.1.4/libtool +0 -8890
- data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile +0 -484
- data/ext/nutcracker/contrib/yaml-0.1.4/src/api.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/api.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/libyaml.la +0 -41
- data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.lo +0 -12
- data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/stamp-h1 +0 -1
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile +0 -675
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.o +0 -0
- data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc +0 -10
- data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc.in +0 -10
- data/ext/nutcracker/exconf.rb +0 -0
- data/ext/nutcracker/libtool +0 -9403
- data/ext/nutcracker/src/Makefile +0 -647
- data/ext/nutcracker/src/hashkit/Makefile +0 -476
- data/ext/nutcracker/src/hashkit/libhashkit.a +0 -0
- data/ext/nutcracker/src/hashkit/nc_crc16.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_crc32.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_fnv.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_hsieh.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_jenkins.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_ketama.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_md5.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_modula.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_murmur.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_one_at_a_time.o +0 -0
- data/ext/nutcracker/src/hashkit/nc_random.o +0 -0
- data/ext/nutcracker/src/nc.o +0 -0
- data/ext/nutcracker/src/nc_array.o +0 -0
- data/ext/nutcracker/src/nc_client.o +0 -0
- data/ext/nutcracker/src/nc_conf.o +0 -0
- data/ext/nutcracker/src/nc_connection.o +0 -0
- data/ext/nutcracker/src/nc_core.o +0 -0
- data/ext/nutcracker/src/nc_epoll.o +0 -0
- data/ext/nutcracker/src/nc_kqueue.c +0 -296
- data/ext/nutcracker/src/nc_kqueue.o +0 -0
- data/ext/nutcracker/src/nc_log.o +0 -0
- data/ext/nutcracker/src/nc_mbuf.o +0 -0
- data/ext/nutcracker/src/nc_message.o +0 -0
- data/ext/nutcracker/src/nc_proxy.o +0 -0
- data/ext/nutcracker/src/nc_rbtree.o +0 -0
- data/ext/nutcracker/src/nc_request.o +0 -0
- data/ext/nutcracker/src/nc_response.o +0 -0
- data/ext/nutcracker/src/nc_server.o +0 -0
- data/ext/nutcracker/src/nc_signal.o +0 -0
- data/ext/nutcracker/src/nc_stats.o +0 -0
- data/ext/nutcracker/src/nc_string.o +0 -0
- data/ext/nutcracker/src/nc_util.o +0 -0
- data/ext/nutcracker/src/nutcracker +0 -0
- data/ext/nutcracker/src/proto/Makefile +0 -454
- data/ext/nutcracker/src/proto/libproto.a +0 -0
- data/ext/nutcracker/src/proto/nc_memcache.o +0 -0
- data/ext/nutcracker/src/proto/nc_redis.o +0 -0
- data/ext/nutcracker/stamp-h1 +0 -1
@@ -40,20 +40,10 @@
|
|
40
40
|
# define NC_STATS 0
|
41
41
|
#endif
|
42
42
|
|
43
|
-
#ifdef HAVE_EPOLL
|
44
|
-
#define NC_HAVE_EPOLL 1
|
45
|
-
#elif HAVE_KQUEUE
|
46
|
-
#define NC_HAVE_KQUEUE 1
|
47
|
-
#endif
|
48
|
-
|
49
43
|
#ifdef HAVE_LITTLE_ENDIAN
|
50
44
|
# define NC_LITTLE_ENDIAN 1
|
51
45
|
#endif
|
52
46
|
|
53
|
-
#ifdef HAVE_BACKTRACE
|
54
|
-
#define NC_HAVE_BACKTRACE 1
|
55
|
-
#endif
|
56
|
-
|
57
47
|
#define NC_OK 0
|
58
48
|
#define NC_ERROR -1
|
59
49
|
#define NC_EAGAIN -2
|
@@ -111,12 +101,14 @@ struct context {
|
|
111
101
|
struct stats *stats; /* stats */
|
112
102
|
|
113
103
|
struct array pool; /* server_pool[] */
|
114
|
-
|
104
|
+
|
105
|
+
int ep; /* epoll device */
|
106
|
+
int nevent; /* # epoll event */
|
115
107
|
int max_timeout; /* epoll wait max timeout in msec */
|
116
|
-
int timeout;
|
108
|
+
int timeout; /* epoll wait timeout in msec */
|
109
|
+
struct epoll_event *event; /* epoll event */
|
117
110
|
};
|
118
111
|
|
119
|
-
|
120
112
|
struct instance {
|
121
113
|
struct context *ctx; /* active context */
|
122
114
|
int log_level; /* log level */
|
@@ -16,86 +16,66 @@
|
|
16
16
|
*/
|
17
17
|
|
18
18
|
#include <unistd.h>
|
19
|
+
#include <sys/epoll.h>
|
20
|
+
|
19
21
|
#include <nc_core.h>
|
20
22
|
#include <nc_event.h>
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
struct evbase *
|
26
|
-
evbase_create(int nevent, void (*callback_fp)(void *, uint32_t))
|
24
|
+
int
|
25
|
+
event_init(struct context *ctx, int size)
|
27
26
|
{
|
28
|
-
|
29
|
-
struct evbase *evb;
|
30
27
|
int status, ep;
|
31
28
|
struct epoll_event *event;
|
32
29
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}
|
30
|
+
ASSERT(ctx->ep < 0);
|
31
|
+
ASSERT(ctx->nevent != 0);
|
32
|
+
ASSERT(ctx->event == NULL);
|
37
33
|
|
38
|
-
ep = epoll_create(
|
34
|
+
ep = epoll_create(size);
|
39
35
|
if (ep < 0) {
|
40
|
-
log_error("epoll create of size %d failed: %s",
|
41
|
-
return
|
36
|
+
log_error("epoll create of size %d failed: %s", size, strerror(errno));
|
37
|
+
return -1;
|
42
38
|
}
|
43
39
|
|
44
|
-
event = nc_calloc(nevent, sizeof(*event));
|
40
|
+
event = nc_calloc(ctx->nevent, sizeof(*ctx->event));
|
45
41
|
if (event == NULL) {
|
46
42
|
status = close(ep);
|
47
43
|
if (status < 0) {
|
48
44
|
log_error("close e %d failed, ignored: %s", ep, strerror(errno));
|
49
45
|
}
|
50
|
-
return
|
51
|
-
}
|
52
|
-
|
53
|
-
evb = nc_alloc(sizeof(*evb));
|
54
|
-
if (evb == NULL) {
|
55
|
-
nc_free(event);
|
56
|
-
status = close(ep);
|
57
|
-
if (status < 0) {
|
58
|
-
log_error("close e %d failed, ignored: %s", ep, strerror(errno));
|
59
|
-
}
|
60
|
-
return NULL;
|
61
|
-
|
46
|
+
return -1;
|
62
47
|
}
|
63
48
|
|
64
|
-
|
65
|
-
|
66
|
-
evb->event = event;
|
67
|
-
evb->callback_fp = callback_fp;
|
49
|
+
ctx->ep = ep;
|
50
|
+
ctx->event = event;
|
68
51
|
|
69
|
-
log_debug(LOG_INFO, "e %d with nevent %d",
|
70
|
-
|
52
|
+
log_debug(LOG_INFO, "e %d with nevent %d timeout %d", ctx->ep,
|
53
|
+
ctx->nevent, ctx->timeout);
|
71
54
|
|
72
|
-
return
|
55
|
+
return 0;
|
73
56
|
}
|
74
57
|
|
75
58
|
void
|
76
|
-
|
59
|
+
event_deinit(struct context *ctx)
|
77
60
|
{
|
78
61
|
int status;
|
79
62
|
|
80
|
-
|
63
|
+
ASSERT(ctx->ep >= 0);
|
81
64
|
|
82
|
-
|
65
|
+
nc_free(ctx->event);
|
83
66
|
|
84
|
-
|
85
|
-
|
86
|
-
status = close(evb->ep);
|
67
|
+
status = close(ctx->ep);
|
87
68
|
if (status < 0) {
|
88
|
-
log_error("close e %d failed, ignored: %s",
|
69
|
+
log_error("close e %d failed, ignored: %s", ctx->ep, strerror(errno));
|
89
70
|
}
|
90
|
-
|
71
|
+
ctx->ep = -1;
|
91
72
|
}
|
92
73
|
|
93
74
|
int
|
94
|
-
event_add_out(
|
75
|
+
event_add_out(int ep, struct conn *c)
|
95
76
|
{
|
96
77
|
int status;
|
97
78
|
struct epoll_event event;
|
98
|
-
int ep = evb->ep;
|
99
79
|
|
100
80
|
ASSERT(ep > 0);
|
101
81
|
ASSERT(c != NULL);
|
@@ -121,11 +101,10 @@ event_add_out(struct evbase *evb, struct conn *c)
|
|
121
101
|
}
|
122
102
|
|
123
103
|
int
|
124
|
-
event_del_out(
|
104
|
+
event_del_out(int ep, struct conn *c)
|
125
105
|
{
|
126
106
|
int status;
|
127
107
|
struct epoll_event event;
|
128
|
-
int ep = evb->ep;
|
129
108
|
|
130
109
|
ASSERT(ep > 0);
|
131
110
|
ASSERT(c != NULL);
|
@@ -151,11 +130,10 @@ event_del_out(struct evbase *evb, struct conn *c)
|
|
151
130
|
}
|
152
131
|
|
153
132
|
int
|
154
|
-
event_add_conn(
|
133
|
+
event_add_conn(int ep, struct conn *c)
|
155
134
|
{
|
156
135
|
int status;
|
157
136
|
struct epoll_event event;
|
158
|
-
int ep = evb->ep;
|
159
137
|
|
160
138
|
ASSERT(ep > 0);
|
161
139
|
ASSERT(c != NULL);
|
@@ -177,10 +155,9 @@ event_add_conn(struct evbase *evb, struct conn *c)
|
|
177
155
|
}
|
178
156
|
|
179
157
|
int
|
180
|
-
event_del_conn(
|
158
|
+
event_del_conn(int ep, struct conn *c)
|
181
159
|
{
|
182
160
|
int status;
|
183
|
-
int ep = evb->ep;
|
184
161
|
|
185
162
|
ASSERT(ep > 0);
|
186
163
|
ASSERT(c != NULL);
|
@@ -199,14 +176,9 @@ event_del_conn(struct evbase *evb, struct conn *c)
|
|
199
176
|
}
|
200
177
|
|
201
178
|
int
|
202
|
-
event_wait(struct
|
179
|
+
event_wait(int ep, struct epoll_event *event, int nevent, int timeout)
|
203
180
|
{
|
204
|
-
int nsd
|
205
|
-
uint32_t evflags = 0;
|
206
|
-
int ep = evb->ep;
|
207
|
-
struct epoll_event *event = evb->event;
|
208
|
-
int nevent = evb->nevent;
|
209
|
-
void (*callback_fp)(void *, uint32_t) = evb->callback_fp;
|
181
|
+
int nsd;
|
210
182
|
|
211
183
|
ASSERT(ep > 0);
|
212
184
|
ASSERT(event != NULL);
|
@@ -215,22 +187,6 @@ event_wait(struct evbase *evb, int timeout)
|
|
215
187
|
for (;;) {
|
216
188
|
nsd = epoll_wait(ep, event, nevent, timeout);
|
217
189
|
if (nsd > 0) {
|
218
|
-
for (i = 0; i < nsd; i++) {
|
219
|
-
struct epoll_event *ev = &evb->event[i];
|
220
|
-
|
221
|
-
evflags = 0;
|
222
|
-
if (ev->events & EPOLLERR)
|
223
|
-
evflags |= EV_ERR;
|
224
|
-
|
225
|
-
if (ev->events & EPOLLIN)
|
226
|
-
evflags |= EV_READ;
|
227
|
-
|
228
|
-
if (ev->events & EPOLLOUT)
|
229
|
-
evflags |= EV_WRITE;
|
230
|
-
|
231
|
-
if (callback_fp != NULL)
|
232
|
-
(*callback_fp)((void *) ev->data.ptr, evflags);
|
233
|
-
}
|
234
190
|
return nsd;
|
235
191
|
}
|
236
192
|
|
@@ -253,26 +209,6 @@ event_wait(struct evbase *evb, int timeout)
|
|
253
209
|
|
254
210
|
return -1;
|
255
211
|
}
|
256
|
-
NOT_REACHED();
|
257
|
-
}
|
258
212
|
|
259
|
-
|
260
|
-
event_add_st(struct evbase *evb, int fd)
|
261
|
-
{
|
262
|
-
int status;
|
263
|
-
struct epoll_event ev;
|
264
|
-
|
265
|
-
ev.data.fd = fd;
|
266
|
-
ev.events = EPOLLIN;
|
267
|
-
|
268
|
-
status = epoll_ctl(evb->ep, EPOLL_CTL_ADD, fd, &ev);
|
269
|
-
if (status < 0) {
|
270
|
-
log_error("epoll ctl on e %d sd %d failed: %s", evb->ep, fd,
|
271
|
-
strerror(errno));
|
272
|
-
return status;
|
273
|
-
}
|
274
|
-
|
275
|
-
return status;
|
213
|
+
NOT_REACHED();
|
276
214
|
}
|
277
|
-
|
278
|
-
#endif /* NC_HAVE_EPOLL */
|
@@ -20,40 +20,20 @@
|
|
20
20
|
|
21
21
|
#include <nc_core.h>
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
/*
|
24
|
+
* A hint to the kernel that is used to size the event backing store
|
25
|
+
* of a given epoll instance
|
26
|
+
*/
|
27
|
+
#define EVENT_SIZE_HINT 1024
|
27
28
|
|
28
|
-
|
29
|
-
struct
|
30
|
-
int kq;
|
31
|
-
struct kevent *changes; /* list of changes to be made */
|
32
|
-
struct kevent *kevents; /* list of events returned from kevent */
|
33
|
-
int n_changes; /* number of changes in our list */
|
34
|
-
int n_returned; /* number of events returned from kevent */
|
35
|
-
int n_processed;
|
36
|
-
int nevent;
|
37
|
-
void (*callback_fp)(void *, uint32_t);
|
38
|
-
};
|
39
|
-
#endif
|
40
|
-
#ifdef NC_HAVE_EPOLL
|
41
|
-
struct evbase {
|
42
|
-
int ep;
|
43
|
-
int nevent;
|
44
|
-
struct epoll_event *event;
|
45
|
-
void (*callback_fp)(void *, uint32_t);
|
46
|
-
};
|
47
|
-
#endif
|
29
|
+
int event_init(struct context *ctx, int size);
|
30
|
+
void event_deinit(struct context *ctx);
|
48
31
|
|
49
|
-
|
50
|
-
|
32
|
+
int event_add_out(int ep, struct conn *c);
|
33
|
+
int event_del_out(int ep, struct conn *c);
|
34
|
+
int event_add_conn(int ep, struct conn *c);
|
35
|
+
int event_del_conn(int ep, struct conn *c);
|
51
36
|
|
52
|
-
int
|
53
|
-
int event_del_out(struct evbase *evb, struct conn *c);
|
54
|
-
int event_add_conn(struct evbase *evb, struct conn *c);
|
55
|
-
int event_del_conn(struct evbase *evb, struct conn *c);
|
56
|
-
int event_wait(struct evbase *evb, int timeout);
|
57
|
-
int event_add_st(struct evbase *evb, int fd);
|
37
|
+
int event_wait(int ep, struct epoll_event *event, int nevent, int timeout);
|
58
38
|
|
59
|
-
#endif
|
39
|
+
#endif
|
data/ext/nutcracker/src/nc_log.c
CHANGED
File without changes
|
data/ext/nutcracker/src/nc_log.h
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -163,18 +163,18 @@ proxy_listen(struct context *ctx, struct conn *p)
|
|
163
163
|
return NC_ERROR;
|
164
164
|
}
|
165
165
|
|
166
|
-
status = event_add_conn(ctx->
|
166
|
+
status = event_add_conn(ctx->ep, p);
|
167
167
|
if (status < 0) {
|
168
|
-
log_error("event add conn p %d on addr '%.*s' failed: %s",
|
169
|
-
p->sd, pool->addrstr.len, pool->addrstr.data,
|
168
|
+
log_error("event add conn e %d p %d on addr '%.*s' failed: %s",
|
169
|
+
ctx->ep, p->sd, pool->addrstr.len, pool->addrstr.data,
|
170
170
|
strerror(errno));
|
171
171
|
return NC_ERROR;
|
172
172
|
}
|
173
173
|
|
174
|
-
status = event_del_out(ctx->
|
174
|
+
status = event_del_out(ctx->ep, p);
|
175
175
|
if (status < 0) {
|
176
|
-
log_error("event del out p %d on addr '%.*s' failed: %s",
|
177
|
-
p->sd, pool->addrstr.len, pool->addrstr.data,
|
176
|
+
log_error("event del out e %d p %d on addr '%.*s' failed: %s",
|
177
|
+
ctx->ep, p->sd, pool->addrstr.len, pool->addrstr.data,
|
178
178
|
strerror(errno));
|
179
179
|
return NC_ERROR;
|
180
180
|
}
|
@@ -325,9 +325,9 @@ proxy_accept(struct context *ctx, struct conn *p)
|
|
325
325
|
}
|
326
326
|
}
|
327
327
|
|
328
|
-
status = event_add_conn(ctx->
|
328
|
+
status = event_add_conn(ctx->ep, c);
|
329
329
|
if (status < 0) {
|
330
|
-
log_error("event add conn from p %d failed: %s", p->sd,
|
330
|
+
log_error("event add conn of c %d from p %d failed: %s", c->sd, p->sd,
|
331
331
|
strerror(errno));
|
332
332
|
c->close(ctx, c);
|
333
333
|
return status;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -413,7 +413,7 @@ req_forward_error(struct context *ctx, struct conn *conn, struct msg *msg)
|
|
413
413
|
}
|
414
414
|
|
415
415
|
if (req_done(conn, TAILQ_FIRST(&conn->omsg_q))) {
|
416
|
-
status = event_add_out(ctx->
|
416
|
+
status = event_add_out(ctx->ep, conn);
|
417
417
|
if (status != NC_OK) {
|
418
418
|
conn->err = errno;
|
419
419
|
}
|
@@ -482,7 +482,7 @@ req_forward(struct context *ctx, struct conn *c_conn, struct msg *msg)
|
|
482
482
|
|
483
483
|
/* enqueue the message (request) into server inq */
|
484
484
|
if (TAILQ_EMPTY(&s_conn->imsg_q)) {
|
485
|
-
status = event_add_out(ctx->
|
485
|
+
status = event_add_out(ctx->ep, s_conn);
|
486
486
|
if (status != NC_OK) {
|
487
487
|
req_forward_error(ctx, c_conn, msg);
|
488
488
|
s_conn->err = errno;
|
@@ -533,7 +533,7 @@ req_send_next(struct context *ctx, struct conn *conn)
|
|
533
533
|
nmsg = TAILQ_FIRST(&conn->imsg_q);
|
534
534
|
if (nmsg == NULL) {
|
535
535
|
/* nothing to send as the server inq is empty */
|
536
|
-
status = event_del_out(ctx->
|
536
|
+
status = event_del_out(ctx->ep, conn);
|
537
537
|
if (status != NC_OK) {
|
538
538
|
conn->err = errno;
|
539
539
|
}
|
@@ -157,9 +157,11 @@ rsp_filter(struct context *ctx, struct conn *conn, struct msg *msg)
|
|
157
157
|
|
158
158
|
pmsg = TAILQ_FIRST(&conn->omsg_q);
|
159
159
|
if (pmsg == NULL) {
|
160
|
-
|
161
|
-
msg->
|
160
|
+
log_error("filter stray rsp %"PRIu64" len %"PRIu32" on s %d", msg->id,
|
161
|
+
msg->mlen, conn->sd);
|
162
162
|
rsp_put(msg);
|
163
|
+
errno = EINVAL;
|
164
|
+
conn->err = errno;
|
163
165
|
return true;
|
164
166
|
}
|
165
167
|
ASSERT(pmsg->peer == NULL);
|
@@ -220,7 +222,7 @@ rsp_forward(struct context *ctx, struct conn *s_conn, struct msg *msg)
|
|
220
222
|
ASSERT(c_conn->client && !c_conn->proxy);
|
221
223
|
|
222
224
|
if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
|
223
|
-
status = event_add_out(ctx->
|
225
|
+
status = event_add_out(ctx->ep, c_conn);
|
224
226
|
if (status != NC_OK) {
|
225
227
|
c_conn->err = errno;
|
226
228
|
}
|
@@ -265,7 +267,7 @@ rsp_send_next(struct context *ctx, struct conn *conn)
|
|
265
267
|
log_debug(LOG_INFO, "c %d is done", conn->sd);
|
266
268
|
}
|
267
269
|
|
268
|
-
status = event_del_out(ctx->
|
270
|
+
status = event_del_out(ctx->ep, conn);
|
269
271
|
if (status != NC_OK) {
|
270
272
|
conn->err = errno;
|
271
273
|
}
|
@@ -367,7 +367,7 @@ server_close(struct context *ctx, struct conn *conn)
|
|
367
367
|
msg->err = conn->err;
|
368
368
|
|
369
369
|
if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
|
370
|
-
event_add_out(ctx->
|
370
|
+
event_add_out(ctx->ep, msg->owner);
|
371
371
|
}
|
372
372
|
|
373
373
|
log_debug(LOG_INFO, "close s %d schedule error for req %"PRIu64" "
|
@@ -397,7 +397,7 @@ server_close(struct context *ctx, struct conn *conn)
|
|
397
397
|
msg->err = conn->err;
|
398
398
|
|
399
399
|
if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
|
400
|
-
event_add_out(ctx->
|
400
|
+
event_add_out(ctx->ep, msg->owner);
|
401
401
|
}
|
402
402
|
|
403
403
|
log_debug(LOG_INFO, "close s %d schedule error for req %"PRIu64" "
|
@@ -476,10 +476,10 @@ server_connect(struct context *ctx, struct server *server, struct conn *conn)
|
|
476
476
|
}
|
477
477
|
}
|
478
478
|
|
479
|
-
status = event_add_conn(ctx->
|
479
|
+
status = event_add_conn(ctx->ep, conn);
|
480
480
|
if (status != NC_OK) {
|
481
|
-
log_error("event add conn s %d for server '%.*s' failed: %s",
|
482
|
-
conn->sd, server->pname.len, server->pname.data,
|
481
|
+
log_error("event add conn e %d s %d for server '%.*s' failed: %s",
|
482
|
+
ctx->ep, conn->sd, server->pname.len, server->pname.data,
|
483
483
|
strerror(errno));
|
484
484
|
goto error;
|
485
485
|
}
|