├── .gitignore ├── LICENSE ├── README.md ├── check.sh ├── codec ├── README.md ├── codec.go └── codec_test.go ├── container ├── bitset │ ├── bitset.go │ └── bitset_test.go ├── blocking_queue │ ├── blocking_queue.go │ └── blocking_queue_test.go ├── bloom │ ├── bloom9.go │ └── bloom9_test.go ├── fifo │ ├── fifo.go │ └── fifo_test.go ├── omap │ ├── omap.go │ └── omap_test.go └── pqueue │ ├── README.md │ ├── priority_queue.go │ └── priority_queue_test.go ├── crypto ├── PKCS.go ├── aes.go ├── aes256cbc.go ├── aes256cbc_test.go ├── descbc.go ├── descbc_test.go ├── tripledes.go ├── tripledes_b_test.go └── tripledes_test.go ├── etcdx ├── discovery │ ├── go.mod │ ├── go.sum │ ├── master.go │ └── worker.go ├── master │ ├── go.mod │ ├── go.sum │ └── master.go ├── readme.md ├── sync │ ├── go.mod │ ├── go.sum │ ├── sync.go │ └── sync_test.go └── v3 │ ├── README.md │ ├── client.go │ ├── client_test.go │ ├── go.mod │ ├── go.sum │ ├── kvstore.go │ ├── kvstore_test.go │ ├── lock.go │ └── lock_test.go ├── go.mod ├── go.sum ├── hash ├── cityhash │ ├── cityhash.go │ └── cityhash_test.go ├── hash.go ├── ketama │ ├── ketama.go │ └── ketama_test.go └── murmurhash3 │ ├── mmhash3.go │ └── mmhash3_test.go ├── httpx ├── README.md ├── go.mod ├── go.sum ├── sign.go └── sign_test.go ├── log ├── go.mod ├── go.sum ├── zap.go └── zap_test.go ├── natx ├── README.md ├── defaultApp.go ├── defaultApp_test.go ├── go.mod ├── go.sum ├── msgpack_enc.go ├── natc.go └── natx.go ├── nsqx ├── consumer.go ├── go.mod ├── go.sum └── producer.go ├── pool ├── allocator │ ├── alloc.go │ └── alloc_test.go ├── xbufio │ └── buffio.go ├── xbytes │ ├── bytes.go │ └── writer.go └── xtime │ └── xtime.go ├── pprof ├── pprof_http.go └── pprof_http_test.go ├── pretty.go ├── random └── string.go ├── redisx ├── go.mod ├── go.sum ├── mutex.go ├── redis.go └── redis_test.go ├── referral ├── referral.go └── refferal_test.go ├── sign ├── hmac.go └── hmac_test.go ├── timerx ├── minheap │ ├── timer.go │ └── timer_test.go └── wheel │ ├── timer.go │ └── timer_test.go └── validator └── validator.go /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/README.md -------------------------------------------------------------------------------- /check.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/check.sh -------------------------------------------------------------------------------- /codec/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/codec/README.md -------------------------------------------------------------------------------- /codec/codec.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/codec/codec.go -------------------------------------------------------------------------------- /codec/codec_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/codec/codec_test.go -------------------------------------------------------------------------------- /container/bitset/bitset.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/bitset/bitset.go -------------------------------------------------------------------------------- /container/bitset/bitset_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/bitset/bitset_test.go -------------------------------------------------------------------------------- /container/blocking_queue/blocking_queue.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/blocking_queue/blocking_queue.go -------------------------------------------------------------------------------- /container/blocking_queue/blocking_queue_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/blocking_queue/blocking_queue_test.go -------------------------------------------------------------------------------- /container/bloom/bloom9.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/bloom/bloom9.go -------------------------------------------------------------------------------- /container/bloom/bloom9_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/bloom/bloom9_test.go -------------------------------------------------------------------------------- /container/fifo/fifo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/fifo/fifo.go -------------------------------------------------------------------------------- /container/fifo/fifo_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/fifo/fifo_test.go -------------------------------------------------------------------------------- /container/omap/omap.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/omap/omap.go -------------------------------------------------------------------------------- /container/omap/omap_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/omap/omap_test.go -------------------------------------------------------------------------------- /container/pqueue/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/pqueue/README.md -------------------------------------------------------------------------------- /container/pqueue/priority_queue.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/pqueue/priority_queue.go -------------------------------------------------------------------------------- /container/pqueue/priority_queue_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/container/pqueue/priority_queue_test.go -------------------------------------------------------------------------------- /crypto/PKCS.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/PKCS.go -------------------------------------------------------------------------------- /crypto/aes.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/aes.go -------------------------------------------------------------------------------- /crypto/aes256cbc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/aes256cbc.go -------------------------------------------------------------------------------- /crypto/aes256cbc_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/aes256cbc_test.go -------------------------------------------------------------------------------- /crypto/descbc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/descbc.go -------------------------------------------------------------------------------- /crypto/descbc_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/descbc_test.go -------------------------------------------------------------------------------- /crypto/tripledes.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/tripledes.go -------------------------------------------------------------------------------- /crypto/tripledes_b_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/tripledes_b_test.go -------------------------------------------------------------------------------- /crypto/tripledes_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/crypto/tripledes_test.go -------------------------------------------------------------------------------- /etcdx/discovery/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/discovery/go.mod -------------------------------------------------------------------------------- /etcdx/discovery/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/discovery/go.sum -------------------------------------------------------------------------------- /etcdx/discovery/master.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/discovery/master.go -------------------------------------------------------------------------------- /etcdx/discovery/worker.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/discovery/worker.go -------------------------------------------------------------------------------- /etcdx/master/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/master/go.mod -------------------------------------------------------------------------------- /etcdx/master/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/master/go.sum -------------------------------------------------------------------------------- /etcdx/master/master.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/master/master.go -------------------------------------------------------------------------------- /etcdx/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/readme.md -------------------------------------------------------------------------------- /etcdx/sync/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/sync/go.mod -------------------------------------------------------------------------------- /etcdx/sync/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/sync/go.sum -------------------------------------------------------------------------------- /etcdx/sync/sync.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/sync/sync.go -------------------------------------------------------------------------------- /etcdx/sync/sync_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/sync/sync_test.go -------------------------------------------------------------------------------- /etcdx/v3/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/README.md -------------------------------------------------------------------------------- /etcdx/v3/client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/client.go -------------------------------------------------------------------------------- /etcdx/v3/client_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/client_test.go -------------------------------------------------------------------------------- /etcdx/v3/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/go.mod -------------------------------------------------------------------------------- /etcdx/v3/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/go.sum -------------------------------------------------------------------------------- /etcdx/v3/kvstore.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/kvstore.go -------------------------------------------------------------------------------- /etcdx/v3/kvstore_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/kvstore_test.go -------------------------------------------------------------------------------- /etcdx/v3/lock.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/lock.go -------------------------------------------------------------------------------- /etcdx/v3/lock_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/etcdx/v3/lock_test.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/go.sum -------------------------------------------------------------------------------- /hash/cityhash/cityhash.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/cityhash/cityhash.go -------------------------------------------------------------------------------- /hash/cityhash/cityhash_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/cityhash/cityhash_test.go -------------------------------------------------------------------------------- /hash/hash.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/hash.go -------------------------------------------------------------------------------- /hash/ketama/ketama.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/ketama/ketama.go -------------------------------------------------------------------------------- /hash/ketama/ketama_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/ketama/ketama_test.go -------------------------------------------------------------------------------- /hash/murmurhash3/mmhash3.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/murmurhash3/mmhash3.go -------------------------------------------------------------------------------- /hash/murmurhash3/mmhash3_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/hash/murmurhash3/mmhash3_test.go -------------------------------------------------------------------------------- /httpx/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/httpx/README.md -------------------------------------------------------------------------------- /httpx/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/httpx/go.mod -------------------------------------------------------------------------------- /httpx/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/httpx/go.sum -------------------------------------------------------------------------------- /httpx/sign.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/httpx/sign.go -------------------------------------------------------------------------------- /httpx/sign_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/httpx/sign_test.go -------------------------------------------------------------------------------- /log/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/log/go.mod -------------------------------------------------------------------------------- /log/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/log/go.sum -------------------------------------------------------------------------------- /log/zap.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/log/zap.go -------------------------------------------------------------------------------- /log/zap_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/log/zap_test.go -------------------------------------------------------------------------------- /natx/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/README.md -------------------------------------------------------------------------------- /natx/defaultApp.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/defaultApp.go -------------------------------------------------------------------------------- /natx/defaultApp_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/defaultApp_test.go -------------------------------------------------------------------------------- /natx/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/go.mod -------------------------------------------------------------------------------- /natx/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/go.sum -------------------------------------------------------------------------------- /natx/msgpack_enc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/msgpack_enc.go -------------------------------------------------------------------------------- /natx/natc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/natc.go -------------------------------------------------------------------------------- /natx/natx.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/natx/natx.go -------------------------------------------------------------------------------- /nsqx/consumer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/nsqx/consumer.go -------------------------------------------------------------------------------- /nsqx/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/nsqx/go.mod -------------------------------------------------------------------------------- /nsqx/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/nsqx/go.sum -------------------------------------------------------------------------------- /nsqx/producer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/nsqx/producer.go -------------------------------------------------------------------------------- /pool/allocator/alloc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/allocator/alloc.go -------------------------------------------------------------------------------- /pool/allocator/alloc_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/allocator/alloc_test.go -------------------------------------------------------------------------------- /pool/xbufio/buffio.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/xbufio/buffio.go -------------------------------------------------------------------------------- /pool/xbytes/bytes.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/xbytes/bytes.go -------------------------------------------------------------------------------- /pool/xbytes/writer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/xbytes/writer.go -------------------------------------------------------------------------------- /pool/xtime/xtime.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pool/xtime/xtime.go -------------------------------------------------------------------------------- /pprof/pprof_http.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pprof/pprof_http.go -------------------------------------------------------------------------------- /pprof/pprof_http_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pprof/pprof_http_test.go -------------------------------------------------------------------------------- /pretty.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/pretty.go -------------------------------------------------------------------------------- /random/string.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/random/string.go -------------------------------------------------------------------------------- /redisx/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/redisx/go.mod -------------------------------------------------------------------------------- /redisx/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/redisx/go.sum -------------------------------------------------------------------------------- /redisx/mutex.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/redisx/mutex.go -------------------------------------------------------------------------------- /redisx/redis.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/redisx/redis.go -------------------------------------------------------------------------------- /redisx/redis_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/redisx/redis_test.go -------------------------------------------------------------------------------- /referral/referral.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/referral/referral.go -------------------------------------------------------------------------------- /referral/refferal_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/referral/refferal_test.go -------------------------------------------------------------------------------- /sign/hmac.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/sign/hmac.go -------------------------------------------------------------------------------- /sign/hmac_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/sign/hmac_test.go -------------------------------------------------------------------------------- /timerx/minheap/timer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/timerx/minheap/timer.go -------------------------------------------------------------------------------- /timerx/minheap/timer_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/timerx/minheap/timer_test.go -------------------------------------------------------------------------------- /timerx/wheel/timer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/timerx/wheel/timer.go -------------------------------------------------------------------------------- /timerx/wheel/timer_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/timerx/wheel/timer_test.go -------------------------------------------------------------------------------- /validator/validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axengine/utils/HEAD/validator/validator.go --------------------------------------------------------------------------------