Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update this repo's master branch #80

Closed
wants to merge 316 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
316 commits
Select commit Hold shift + click to select a range
2da786c
Imp: rollback length 64 -> 0
AlexStocks Jul 27, 2019
ab558d1
Rem: gxbytes
AlexStocks Jul 27, 2019
1d7c20c
Fix: divebomb -> dubbogo/gost
AlexStocks Jul 29, 2019
293a60d
Merge pull request #22 from divebomb/master
wongoo Jul 29, 2019
0c47783
fix:修正注释中的单词错误
JerryZhou343 Aug 22, 2019
0659b79
Merge pull request #23 from mfslog/master
AlexStocks Aug 22, 2019
1a47fab
change grNum to chan
pantianying Aug 30, 2019
7d702cf
change log
pantianying Aug 31, 2019
2d40a6f
delete handleLoopDone
pantianying Sep 2, 2019
abef1dd
change variable name
pantianying Sep 3, 2019
0fd80e4
add s.grNum for debug
pantianying Sep 3, 2019
82a97b4
fix
pantianying Sep 3, 2019
6de78d9
Merge pull request #24 from pantianying/pty_getty
wongoo Sep 5, 2019
2282528
Fix: inc write package number when err == nil in WritePkg
AlexStocks Sep 5, 2019
34d2a34
Merge pull request #25 from divebomb/master
wongoo Sep 5, 2019
8e2387f
Add: writev
AlexStocks Sep 7, 2019
e545f6f
Imp: tcp stream handler
AlexStocks Sep 7, 2019
2b6c658
Merge pull request #26 from divebomb/master
wongoo Sep 10, 2019
be9ebbd
Add: travis
AlexStocks Sep 21, 2019
1a6b813
Mod: add go 13
AlexStocks Sep 21, 2019
c34c7a7
Merge pull request #28 from divebomb/master
wongoo Sep 21, 2019
8301e25
issue29
Sep 30, 2019
085aa67
travis
Sep 30, 2019
193d5d0
Merge pull request #30 from dubbo-x/issue29
wongoo Oct 1, 2019
7731d5c
Rem: utils
AlexStocks Jan 11, 2020
1ff1122
Rem: utils
Jan 11, 2020
2f6fb03
Mod: format go.sum
Jan 11, 2020
a57b22e
Imp: enlarge time wheel span from 2m to 15m
AlexStocks Jan 11, 2020
6ddf0fc
Create auto-comment.yml
zouyx Jan 13, 2020
f213b67
Mod: remark io timeout log
AlexStocks Feb 11, 2020
5334e7d
Rem: setUDPSocketOptions
AlexStocks Mar 2, 2020
888d134
Imp: close connection asynchronously in session.gc
AlexStocks Mar 2, 2020
a733de8
Upd: travis config
AlexStocks Mar 2, 2020
2d033a8
Add: ut
AlexStocks Mar 2, 2020
9958f11
Mod: readme
AlexStocks Mar 7, 2020
34bbe7a
Add: go report card
AlexStocks Mar 10, 2020
32aace3
change the log prints
wenxuwan Mar 28, 2020
52cde59
Merge pull request #35 from wenxuwan/master
AlexStocks Mar 28, 2020
6516e4c
Impl: reduce syscall and memcopy for multiple package
watermelo Apr 2, 2020
8b02420
Fix: some log format & update WriteBytesArray method
watermelo Apr 3, 2020
7df84f8
Mod: writePkgNum count
watermelo Apr 7, 2020
45d3d7d
Merge pull request #36 from zaihang365/33_using_writev
AlexStocks Apr 8, 2020
8402bd4
merge upstream
Apr 23, 2020
862579a
Add: listen on random local port
AlexStocks Apr 23, 2020
dd9b920
Rem: reduntant codes
AlexStocks Apr 23, 2020
6182cdb
Imp: recover WriteBytesArray
AlexStocks Apr 23, 2020
f3924fe
Imp: travis script
AlexStocks Apr 24, 2020
076a806
Merge pull request #37 from divebomb/master
wongoo Apr 24, 2020
d41aa4c
Add: StreamServer & PacketServer
AlexStocks Apr 24, 2020
2964008
Fix: disable zip compression in session
AlexStocks Apr 24, 2020
5d412f1
Fix: get error cause after server.accept
AlexStocks Apr 24, 2020
d6fb336
Imp: new udp session
AlexStocks Apr 24, 2020
809cef2
Fix: jerrors -> perrors
AlexStocks Apr 24, 2020
5cc2deb
Mod: go mod
AlexStocks Apr 24, 2020
4f0a9de
Merge pull request #38 from divebomb/master
AlexStocks Apr 27, 2020
9077f6b
Fix: Send multiple pkgs repetitive by tcp (#39)
watermelo Jun 23, 2020
9850319
Add: license checker
watermelo Jul 14, 2020
123dc5f
Add: validate license script
watermelo Jul 14, 2020
01daadd
Add: add apache license
watermelo Jul 14, 2020
d92c700
Fix: lost some pkgs
watermelo Jul 14, 2020
1d95e7c
Merge pull request #41 from zaihang365/featrue/license
AlexStocks Jul 18, 2020
3c5b952
Mod: replace some pkgs
watermelo Jul 18, 2020
5f47c4d
change grNum to chan
pantianying Aug 30, 2019
3e33cb5
change log
pantianying Aug 31, 2019
07467b3
delete handleLoopDone
pantianying Sep 2, 2019
3c6cf46
change variable name
pantianying Sep 3, 2019
7f7fc05
add s.grNum for debug
pantianying Sep 3, 2019
a5defb4
fix
pantianying Sep 3, 2019
96ceb76
Fix: inc write package number when err == nil in WritePkg
AlexStocks Sep 5, 2019
5846fc5
Add: writev
AlexStocks Sep 7, 2019
d7967ea
Imp: tcp stream handler
AlexStocks Sep 7, 2019
b116fce
Add: travis
AlexStocks Sep 21, 2019
4de742a
Mod: add go 13
AlexStocks Sep 21, 2019
941dd05
Rem: utils
AlexStocks Jan 11, 2020
6228898
issue29
Sep 30, 2019
dac68c0
travis
Sep 30, 2019
90049f7
Rem: utils
Jan 11, 2020
b438b28
Mod: format go.sum
Jan 11, 2020
2647617
Imp: enlarge time wheel span from 2m to 15m
AlexStocks Jan 11, 2020
feb51d3
Create auto-comment.yml
zouyx Jan 13, 2020
9833768
Mod: remark io timeout log
AlexStocks Feb 11, 2020
4709210
Rem: setUDPSocketOptions
AlexStocks Mar 2, 2020
c22d4d2
Imp: close connection asynchronously in session.gc
AlexStocks Mar 2, 2020
c3f2367
Upd: travis config
AlexStocks Mar 2, 2020
534a273
Add: ut
AlexStocks Mar 2, 2020
f077b6a
Mod: readme
AlexStocks Mar 7, 2020
81dbd2c
Add: go report card
AlexStocks Mar 10, 2020
9399352
change the log prints
wenxuwan Mar 28, 2020
db32236
Impl: reduce syscall and memcopy for multiple package
watermelo Apr 2, 2020
5969f80
Fix: some log format & update WriteBytesArray method
watermelo Apr 3, 2020
0683f35
Mod: writePkgNum count
watermelo Apr 7, 2020
ab472d9
Add: listen on random local port
AlexStocks Apr 23, 2020
d5d1b9e
Rem: reduntant codes
AlexStocks Apr 23, 2020
805e171
Imp: recover WriteBytesArray
AlexStocks Apr 23, 2020
e0569c0
Imp: travis script
AlexStocks Apr 24, 2020
3f88091
Add: StreamServer & PacketServer
AlexStocks Apr 24, 2020
1e4b65b
Fix: disable zip compression in session
AlexStocks Apr 24, 2020
4d0b366
Fix: get error cause after server.accept
AlexStocks Apr 24, 2020
b4bd367
Imp: new udp session
AlexStocks Apr 24, 2020
812064c
Fix: jerrors -> perrors
AlexStocks Apr 24, 2020
f3a16c1
Fix: Send multiple pkgs repetitive by tcp (#39)
watermelo Jun 23, 2020
406c74e
Add: license checker
watermelo Jul 14, 2020
39b83b3
Add: validate license script
watermelo Jul 14, 2020
dc5c5ba
Add: add apache license
watermelo Jul 14, 2020
dd096e8
Fix: lost some pkgs
watermelo Jul 14, 2020
37b7393
Mod: update mod
watermelo Jul 18, 2020
17bab95
Add: update comments
watermelo Jul 19, 2020
0585c3c
Merge branch 'master' into feature/removeCodes
watermelo Jul 19, 2020
b9b42f1
Merge branch 'master' into feature/removeCodes
watermelo Jul 19, 2020
2b76c4d
Mod: update branch conflict
watermelo Jul 19, 2020
80031a3
Mod: fmt the codes
watermelo Jul 19, 2020
58244ae
Merge pull request #43 from zaihang365/feature/removeCodes
AlexStocks Jul 19, 2020
4965ba8
Merge pull request #42 from zaihang365/featrue/ReplacePkgs
AlexStocks Jul 19, 2020
b89c0bb
add tls support
Jul 20, 2020
94d35a3
add tls support
Jul 27, 2020
af46070
add tls support
Jul 27, 2020
081c4ef
add tls demo
Jul 31, 2020
a153e2e
add tls config builder interface
Aug 1, 2020
169328c
add tls test case
Aug 2, 2020
2c6d646
Merge pull request #44 from aliiohs/feature/addTlsSupport
AlexStocks Aug 7, 2020
fb33e07
add tls test case (#45)
aliiohs Aug 10, 2020
aabda77
expose maxWheelTimeSpan
Aug 12, 2020
f9c6e8b
expose maxWheelTimeSpan
Aug 12, 2020
957f65f
Merge pull request #46 from aliiohs/exposeMaxWheelTimeSpan
watermelo Aug 13, 2020
43ab2e8
update go module name
Aug 18, 2020
fc4127d
Mod: format codes
AlexStocks Aug 18, 2020
ed1b9b6
Create go.yml
sdttttt Sep 13, 2020
45bcafa
Update go.yml
sdttttt Sep 13, 2020
2116470
ci: migrate complete.
sdttttt Sep 13, 2020
9ebdfd3
docs: Fix description mistake.
sdttttt Sep 13, 2020
353bb67
Rename go.yml to github-actions.yml
sdttttt Sep 13, 2020
84c3a07
Merge pull request #47 from sdttttt/sdttttt-patch-1
AlexStocks Oct 31, 2020
8d10f6a
Create .asf.yaml
htynkn Nov 4, 2020
bf36b5d
update ding token
Nov 13, 2020
e743d22
opt: move taskpool at endpoint layer
watermelo Nov 15, 2020
e40c72a
opt: remove unuseful pkg
watermelo Nov 18, 2020
9ae631e
opt: update gost to 1.9.6
watermelo Nov 22, 2020
bc65ed0
Merge pull request #50 from zaihang365/opt_taskpool
AlexStocks Nov 23, 2020
2fa7b04
Add change list
watermelo Nov 24, 2020
2827ac5
Merge pull request #51 from zaihang365/1.4
AlexStocks Nov 27, 2020
8296ef8
Rem: session.SetRQLen
Dec 2, 2020
ee770be
upgrade gost version
AlexStocks Dec 2, 2020
ff08429
Merge pull request #53 from apache/1.4
AlexStocks Dec 2, 2020
d80971c
Rem: wQ
AlexStocks Dec 10, 2020
614f0c7
delete session.SetTaskPool
AlexStocks Dec 13, 2020
020cac6
Add: go lint
AlexStocks Dec 13, 2020
a68aa36
Merge pull request #54 from apache/feature/delet_wq
AlexStocks Dec 13, 2020
1bcef0b
update gost version
AlexStocks Dec 13, 2020
ef4aaa4
remark dingding notification
AlexStocks Dec 28, 2020
4a15143
return write length
AlexStocks Jan 28, 2021
3eb8b38
Merge pull request #57 from apache/feature/write-size
AlexStocks Jan 29, 2021
9c017bc
support return length
cvictory Jan 29, 2021
e2bdee6
support return total need transfer length
cvictory Jan 29, 2021
0e5e138
review issue
cvictory Jan 29, 2021
30e6264
Merge pull request #58 from cvictory/fix/support_return_length
AlexStocks Jan 29, 2021
0df9283
feat: format use gofumpt
georgehao Mar 31, 2021
f9499a7
Merge pull request #59 from georgehao/master
AlexStocks Mar 31, 2021
17b08dc
fix conn data race
Jul 1, 2021
03651ca
Merge pull request #68 from luoyunhe/fix
AlexStocks Jul 1, 2021
168f412
Ftr: delete session.handleLoop (#56)
AlexStocks Jul 9, 2021
3ea0e19
style(*): format all imports with dubbogo/tools/imports-formatter
Mulavar Jul 27, 2021
5b7d8d2
Merge pull request #69 from Mulavar/imports-fmt
AlexStocks Jul 27, 2021
d711a4b
fix(*): revert 17b08d to fix timeout error
Aug 10, 2021
1f33b20
Merge pull request #72 from Mulavar/fix/timeout
AlexStocks Aug 11, 2021
c8ebbd8
format comments & function name
Aug 7, 2021
ada6920
rft(*): reorganize code with proper file name
Aug 21, 2021
917228c
Merge pull request #73 from Mulavar/rft/code-format
AlexStocks Aug 22, 2021
c7df4be
remove read buffer collection
Sep 11, 2021
fb96d44
fix: remote unused defer
Sep 23, 2021
5496713
Merge pull request #76 from LaurenceLiZhixin/ori_master
AlexStocks Sep 23, 2021
70fe756
fix issue 77: process the last package before handle eof error
AlexStocks Oct 9, 2021
d58f9f3
Merge pull request #78 from apache/fix/issue-77
AlexStocks Oct 17, 2021
1f01b71
Opt: change timeout to atomic
Lvnszn Oct 22, 2021
9be0aee
fix license
Lvnszn Oct 22, 2021
04c5bef
gofumpt connection
Lvnszn Oct 24, 2021
409eb86
Imp: using gxbytes.Buffer WriteNextBegin/WriteNextEnd
AlexStocks Oct 26, 2021
66f2506
Merge pull request #80 from takewofly/bug/race
AlexStocks Oct 28, 2021
43cebf1
update go mod
AlexStocks Oct 28, 2021
a2461f8
Merge pull request #81 from apache/feature/gxbytes-buffer
AlexStocks Oct 28, 2021
9c46f0f
Opt: split large packet to n*16KB packet
Lvnszn Oct 30, 2021
3c3a318
fmt for license
Lvnszn Oct 30, 2021
60b2b74
address comment
Lvnszn Oct 30, 2021
56c79d7
use lock on write method
Lvnszn Nov 14, 2021
c3d9e00
address comment
Lvnszn Nov 15, 2021
a048da4
reduce size to zero then return
Lvnszn Nov 16, 2021
03338b9
make var more readable
Lvnszn Nov 16, 2021
c36fe81
address comment
Lvnszn Nov 16, 2021
da1e5d5
gofumpt
Lvnszn Nov 16, 2021
a3f9370
16KB use Rlock
Lvnszn Nov 17, 2021
54a2fad
Merge pull request #82 from takewofly/feature/split
AlexStocks Nov 17, 2021
c8ee29c
Opt: upgrade gost for resolve problem
Lvnszn Nov 18, 2021
16374d2
Merge pull request #84 from takewofly/feature/upgrade_gost
AlexStocks Nov 18, 2021
06db3ff
Ftr: move getty's example to dubbo-getty
Lvnszn Nov 22, 2021
b1acb3b
fix ci
Lvnszn Nov 22, 2021
a9bd614
remove change log
Lvnszn Nov 23, 2021
66e083f
Merge pull request #85 from takewofly/feature/example
AlexStocks Nov 29, 2021
de68c22
Ipm: use dubbogo log lib
Lvnszn Dec 8, 2021
76136d0
Merge pull request #86 from takewofly/feature/log
AlexStocks Dec 20, 2021
d25d2a8
Fix: taskPool will execute task when session was nil
Lvnszn Jan 7, 2022
292995d
Merge pull request #91 from takewofly/bug/panic
AlexStocks Jan 12, 2022
431c47e
Fix: fix connection was assigned a nil will lead to panic
Lvnszn Jan 11, 2022
0b14a0d
Merge pull request #92 from takewofly/feat/connect_session
AlexStocks Jan 15, 2022
2a4b909
Imp: remove goext & log4go in dep
Lvnszn Feb 18, 2022
ceb444b
Merge pull request #93 from takewofly/fix/dep
AlexStocks Feb 18, 2022
69d3bab
add gnet comparation result
AlexStocks Aug 19, 2022
f0a3ead
fix: change Aggregate bandwidth
Lvnszn Aug 19, 2022
dc1f011
Merge pull request #96 from takewofly/fix_benchmark_mb
AlexStocks Aug 19, 2022
532ea3f
Update gost
Leospard Aug 24, 2022
3da63c3
Merge pull request #97 from Leospard/master
AlexStocks Aug 25, 2022
4dc6252
fix: wrong tls config
ZLBer Oct 22, 2022
532bf58
Merge pull request #98 from ZLBer/tls
AlexStocks Oct 23, 2022
2ecc342
upgrade gost version
AlexStocks Nov 10, 2022
33a17aa
refactor: Export private methods in the gett.Connection interface for…
iSuperCoder Jul 26, 2023
32af5a7
refactor: Adding comments to exported interface methods.
iSuperCoder Jul 27, 2023
1dea1c9
chore: unnecessary use of fmt.Sprintf
iSuperCoder Jul 29, 2023
1936cf8
Merge pull request #102 from iSuperCoder/feature/sync_from_alexstocks
AlexStocks Jul 31, 2023
7c0f003
Merge pull request #101 from iSuperCoder/refactor/mockable
AlexStocks Jul 31, 2023
ccec132
disable SetReadDeadline/SetWriteDeadline optimization alg because Go …
AlexStocks Mar 14, 2024
04b1165
Merge pull request #109 from apache/fix/set-read-write-deadline
AlexStocks Mar 14, 2024
582f4ca
fix: when session is closed, no need do OnMessage
Lvnszn Mar 13, 2024
3038141
chore: upgrade go version from 1.14 to 1.20
DMwangnima Mar 15, 2024
00bb32f
upgrade golangci-lint version
DMwangnima Mar 15, 2024
3fc5e81
replace io/ioutil to os
DMwangnima Mar 15, 2024
eacf90a
replace deprecated method from Temporary() to Timeout()
DMwangnima Mar 16, 2024
985ac66
fix test
DMwangnima Mar 16, 2024
1643183
Merge pull request #112 from DMwangnima/chore/upgrate_go_to_1.20
AlexStocks Mar 16, 2024
dccc3d5
Bump golang.org/x/sys from 0.0.0-20220128215802-99c3d69c2c27 to 0.1.0
dependabot[bot] Mar 16, 2024
93d91b4
Merge pull request #114 from apache/dependabot/go_modules/golang.org/…
AlexStocks Mar 16, 2024
71b8185
Merge pull request #108 from takewofly/fix_on_message
AlexStocks Mar 16, 2024
4033bd3
bufix: add tlsHandshake timeout to prevent readtimeout cause dead loop
hongshengjie Mar 16, 2024
a5233ed
Merge pull request #115 from hongshengjie/master
AlexStocks Mar 16, 2024
553dc29
fix:1.stop to reconnect when face EOF error 2.exit reconnect when rec…
No-SilverBullet Apr 17, 2024
52e6c4a
restore import farmat
No-SilverBullet Apr 17, 2024
4cbf2c1
restore import format
No-SilverBullet Apr 17, 2024
d3f5be3
style:调整代码注释
No-SilverBullet Apr 17, 2024
4d36106
fix: closing websocket connection returns invalid status code
Jardaliao Apr 17, 2024
0c0272c
style:format code
No-SilverBullet Apr 18, 2024
ac8c9a6
Create main.yml
No-SilverBullet Apr 18, 2024
3fd276b
Delete .github/workflows/main.yml
No-SilverBullet Apr 18, 2024
05a6a9a
style:change the declaration location ofreconnect-related variables
No-SilverBullet Apr 18, 2024
b33c1e6
fix:maxDuration typo
No-SilverBullet Apr 18, 2024
ce6736e
Merge pull request #118 from Jardaliao/fix-closing-connection-returns…
AlexStocks Apr 25, 2024
6a6e1d1
Merge pull request #117 from No-SilverBullet/fix/reconnect
AlexStocks Apr 25, 2024
c929434
Merge branch 'apache:master' into master
No-SilverBullet May 20, 2024
7b6e32d
fix:issue 120 add mutex to prevent data race in websocket write message
No-SilverBullet May 20, 2024
33fad96
refactor:use named return values for WritePkg method to return the ca…
No-SilverBullet May 24, 2024
31379a1
Merge pull request #1 from No-SilverBullet/fix/issue103
No-SilverBullet May 24, 2024
fd6e766
refactor: error format in WritePkg method
No-SilverBullet May 28, 2024
01362ff
Merge pull request #2 from No-SilverBullet/fix/issue103
No-SilverBullet May 28, 2024
2769505
Merge pull request #121 from No-SilverBullet/master
AlexStocks May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
notifications:
commits: [email protected]
issues: [email protected]
pullrequests: [email protected]
jira_options: link label link label
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug Report
about: Report a bug
labels: kind/bug

---

<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!

-->


**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Enhancement Request
about: Suggest an enhancement
labels: kind/feature

---
<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

**Why is this needed**:
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Thanks for sending a pull request!
-->

**What this PR does**:

**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note

```
10 changes: 10 additions & 0 deletions .github/auto-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Comment to a new issue.
issueOpened: >
Thank your for raising a issue. We will try and get back to you as soon as possible.

Please make sure you have given us as much context as possible.

pullRequestOpened: >
Thank your for raising your pull request.

Please make sure you have followed our contributing guidelines. We will review it as soon as possible
113 changes: 113 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: "*"

jobs:

build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
# If you want to matrix build , you can append the following list.
matrix:
go_version:
- '1.20'
os:
- ubuntu-latest

env:
# DING_TOKEN: db178ff8c63cdc1b9ae0b86f7c4006ddf35e0249f4ae03441d80e55fdc600419
# DING_SIGN: SECbcc50d56d7315e57da8469d05da306d6cd825348a781861a42084e9579f1aebb
DING_TOKEN: ${{ secrets.DING_TOKEN }}
DING_SIGN: ${{ secrets.DING_SIGN }}

steps:

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Cache Go Dependence
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Get dependencies
run: |
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
else
go get -v -t -d ./...
fi

- name: License Check
run: |
sh before_validate_license.sh
chmod u+x /tmp/tools/license/license-header-checker
go fmt ./... && [[ -z `git status -s` ]]
/tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]]

- name: Install go ci lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.0

- name: Run Linter
run: golangci-lint run --timeout=10m -v --disable-all --enable=govet --enable=staticcheck --enable=ineffassign --enable=misspell

- name: Test
run: go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic

- name: Coverage
run: bash <(curl -s https://codecov.io/bash)

# # Because the contexts of push and PR are different, there are two Notify.
# # Notifications are triggered only in the apache/dubbo-getty repository.
# - name: DingTalk Message Notify only Push
# uses: zcong1993/[email protected]
# # Whether job is successful or not, always () is always true.
# if: |
# always() &&
# github.event_name == 'push' &&
# github.repository == 'apache/dubbo-getty'
# with:
# # DingDing bot token
# dingToken: ${{ env.DING_TOKEN }}
# secret: ${{ env.DING_SIGN }}
# # Post Body to send
# body: |
# {
# "msgtype": "markdown",
# "markdown": {
# "title": "Github Actions",
# "text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: ${{ github.ref }} \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: [${{ github.sha }}](${{ github.event.compare }})"
# }
# }
#
# - name: DingTalk Message Notify only PR
# uses: zcong1993/[email protected]
# if: |
# always() &&
# github.event_name == 'pull_request' &&
# github.repository == 'apache/dubbo-getty'
# with:
# dingToken: ${{ env.DING_TOKEN }}
# secret: ${{ env.DING_SIGN }}
# body: |
# {
# "msgtype": "markdown",
# "markdown": {
# "title": "Github Actions",
# "text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - pr_title: **${{ github.event.pull_request.title }}** \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: [${{ github.ref }}](${{ github.event.pull_request._links.html.href }}) \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n > SHA: [${{ github.sha }}](${{ github.event.pull_request._links.html.href }})"
# }
# }
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classes
# vim
*.swp

# go.sum
# Gopkg.lock
# vendor/
vendor/

# vscode
.vscode/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "examples"]
path = examples
url = https://github.com/AlexStocks/getty-examples.git
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: go

os:
- linux

go:
- "1.13"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把 go 版本升级到 1.20 吧,这个太低了


env:
- GO111MODULE=on

install: true

script:
# license-check
- echo 'start license check'
- sh before_validate_license.sh
- chmod u+x /tmp/tools/license/license-header-checker
- go fmt ./... && [[ -z `git status -s` ]]
- /tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]]
- go mod vendor && go test $(go list ./... | grep -v vendor | grep -v demo) -coverprofile=coverage.txt -covermode=atomic

after_success:
- bash <(curl -s https://codecov.io/bash)

notifications:
webhooks: https://oapi.dingtalk.com/robot/send?access_token=75f4f1ec3868508aa89e5a5d6f9d342216809df3ebc8a78c8ae8722848e06166
17 changes: 17 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Release Notes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dubbo-getty 的内容不要带过来

---

## 1.4.0
- [Impl: move taskpool at endpoint layer](https://github.com/apache/dubbo-getty/pull/50)

## 1.3.x
- [Fix: ExposeMaxWheelTimeSpan](https://github.com/apache/dubbo-getty/pull/46)
- [Impl: tls support](https://github.com/apache/dubbo-getty/pull/44)
- [Fix: send multiple pkgs repetitive](https://github.com/apache/dubbo-getty/pull/39)
- [Impl: StreamServer & PacketServer](https://github.com/apache/dubbo-getty/pull/38)
- [Impl: listen on random local por](https://github.com/apache/dubbo-getty/pull/37)
- [Impl: reduce syscall and memcopy for multiple package](https://github.com/apache/dubbo-getty/pull/36)
- [Impl: enlarge time wheel span](https://github.com/apache/dubbo-getty/commit/a57b22edbb3a7de383ad7a94387000bfd4eca194)
- [Fix: skip the log output of EOF error](https://github.com/apache/dubbo-getty/pull/26)
- [Impl: add travis](https://github.com/apache/dubbo-getty/pull/28)
- [Impl: add writev](https://github.com/apache/dubbo-getty/pull/26)
39 changes: 7 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,22 @@

*a netty like asynchronous network I/O library*

[![Build Status](https://travis-ci.org/dubbogo/getty.svg?branch=master)](https://travis-ci.org/dubbogo/getty)
[![codecov](https://codecov.io/gh/dubbogo/getty/branch/master/graph/badge.svg)](https://codecov.io/gh/dubbogo/getty)
[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/dubbogo/getty?tab=doc)
[![Go Report Card](https://goreportcard.com/badge/github.com/dubbogo/getty)](https://goreportcard.com/report/github.com/dubbogo/getty)
![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)

## INTRO

Getty is a asynchronous network I/O library in golang. Getty is based on "ngo" whose author is [sanbit](https://github.com/sanbit). Getty works on tcp/udp/websocket network protocol and supplies [a uniform interface](https://github.com/alexstocks/getty/blob/master/getty.go#L45).
Getty is a asynchronous network I/O library in golang. Getty works on tcp/udp/websocket network protocol and supplies [a uniform interface](https://github.com/dubbogo/getty/blob/master/getty.go#L45).

In getty there are two goroutines in one connection(session), one reads tcp stream/udp packet/websocket package, the other handles logic process and writes response into network write buffer. If your logic process may take a long time, you should start a new logic process goroutine by yourself in codec.go:(Codec)OnMessage.

You can also handle heartbeat logic in codec.go:(Codec):OnCron. If you use tcp/udp, you should send hearbeat package by yourself, and then invoke session.go:(Session)UpdateActive to update its active time. Please check whether the tcp session has been timeout or not in codec.go:(Codec)OnCron by session.go:(Session)GetActive.

Whatever if you use websocket, you do not need to care about hearbeat request/response because Getty do this task in session.go:(Session)handleLoop by sending/received websocket ping/pong frames. You just need to check whether the websocket session has been timeout or not in codec.go:(Codec)OnCron by session.go:(Session)GetActive.

You can get code example in https://github.com/AlexStocks/getty-examples.

## RPC

An open source, Go based, RPC framework.

Feature list:

- 1 Transport: TCP(√), UDP(X), Websocket(X)
- 2 Codec: ProtoBuf(√), JSON(√)
- 3 Strategy: Failover(√), Failfast(√)
- 4 Metrics: Invoke Statistics(X), User Auth(X)

Code example:

The subdirectory rpc of [getty-examples](https://github.com/alexstocks/getty-examples/) shows how to build rpc client/rpc server.

## Micro

An micro service framework based on getty/rpc.

Feature list:

- 1 Registry: ZooKeeper(√), Etcd(√)
- 2 Load Balance: Random(X), RoundRobin(√), [Self-Defined(√)](https://github.com/alexstocks/getty-examples/blob/master/micro/client/app/main.go#L86)
- 3 Service Discovery: Service Publish(√), Service Watch(√), Service Notify(√)

Code example:

The subdirectory micro of [getty-examples](https://github.com/alexstocks/getty-examples/) shows how to build micro client/rpc server.

## LICENCE

Apache License 2.0
Expand Down
26 changes: 26 additions & 0 deletions before_validate_license.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

remoteLicenseCheckerPath="https://github.com/dubbogo/resources/raw/master/tools/license"
remoteLicenseCheckerName="license-header-checker"
remoteLicenseCheckerURL="${remoteLicenseCheckerPath}/${remoteLicenseCheckerName}"
remoteLicenseName="license.txt"
remoteLicenseURL="${remoteLicenseCheckerPath}/${remoteLicenseName}"

licensePath="/tmp/tools/license"
mkdir -p ${licensePath}
wget -P "${licensePath}" ${remoteLicenseCheckerURL}
wget -P "${licensePath}" ${remoteLicenseURL}
Loading