Skip to content

Commit

Permalink
other: v2 nexus 包增加 IndependentGoroutine 的 broker 实现,该 broker 中将对每个 t…
Browse files Browse the repository at this point in the history
…opic 使用单独的 goroutine 进行维护
  • Loading branch information
kercylan98 committed May 10, 2024
1 parent bd21158 commit 1de5d7c
Show file tree
Hide file tree
Showing 45 changed files with 556 additions and 397 deletions.
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ Minotaur 是一个用于服务端开发的支持库,其中采用了大量泛
> - 网络传输基于 [`panjf2000/gnet`](https://github.com/panjf2000/gnet)[`xtaci/kcp-go`](https://github.com/xtaci/kcp-go) 构建;
> - 该项目的目标是提供一个简单、高效、可扩展的游戏服务器框架,让开发者可以专注于游戏逻辑的开发,而不用花费大量时间在网络传输、配置导表、日志、监控等基础功能的开发上;
#### v0.5.X 之后的版本为重构后的版本,重构后的版本主要有以下特点:
- 移除了大量的无用或不合理的实现,减少了代码的复杂度;
- 所有设计均优先考虑了泛型的使用,提高了代码的复用性;
- 关于 `server` 包,对于整体进行了重构,具体如下:
- 移除了对于 `gRPC` 的支持及依赖;
- 移除了对于 `gin` 的依赖,默认的 HTTP 服务将采用 `http.ServeMux` 进行处理,支持使用自定义 `http.Handler`
- 关于 `WebSocket` 更改为使用 `gnet``github.com/gobwas/ws` 进行处理;
- 开放 `server.Network` 接口,支持自定义网络协议;
- `pprof` 支持运行时动态开关;
- 基于 `shunt` 分流概念的 `actor` 模型整体重构、解耦,并将名称调整为 `queue`,连接所在队列不再与连接绑定,现在支持直接向特定队列发送消息;
- 对外开放服务器消息驱动模型接口,支持自定义消息驱动模型;
-`utils` 包更名为 `toolkit`,并对其中的大量函数、设计、目录结构进行了调整;
- 内置了基于 `nats.io``rpc` 支持;

***

## 特色内容
```mermaid
mindmap
Expand Down
66 changes: 13 additions & 53 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,45 @@ go 1.22.0

require (
github.com/RussellLuo/timingwheel v0.0.0-20220218152713-54845bda3108
github.com/alphadose/haxmap v1.3.1
github.com/gin-contrib/pprof v1.4.0
github.com/gin-gonic/gin v1.9.1
github.com/go-resty/resty/v2 v2.11.0
github.com/fatih/color v1.16.0
github.com/gobwas/ws v1.4.0
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
github.com/gorilla/websocket v1.5.1
github.com/json-iterator/go v1.1.12
github.com/panjf2000/ants/v2 v2.9.0
github.com/panjf2000/gnet v1.6.7
github.com/panjf2000/gnet/v2 v2.3.6
github.com/nats-io/nats.go v1.34.1
github.com/panjf2000/ants/v2 v2.9.1
github.com/panjf2000/gnet/v2 v2.5.2
github.com/pkg/errors v0.9.1
github.com/smartystreets/goconvey v1.8.1
github.com/sony/sonyflake v1.2.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/samber/do/v2 v2.0.0-beta.5
github.com/tealeg/xlsx v1.0.5
github.com/tidwall/gjson v1.17.0
github.com/xtaci/kcp-go/v5 v5.6.8
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.23.0
google.golang.org/grpc v1.60.1
golang.org/x/net v0.25.0
)

require (
github.com/bytedance/gopkg v0.0.0-20240315062850-21fc7a1671a8 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/dave/jennifer v1.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.2 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/reedsolomon v1.12.1 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nats-io/nats.go v1.34.1 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/samber/do/v2 v2.0.0-beta.5 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/samber/go-type-to-string v1.2.0 // indirect
github.com/smarty/assertions v1.15.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/templexxx/cpu v0.1.0 // indirect
github.com/templexxx/xorsimd v0.4.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1de5d7c

Please sign in to comment.