Skip to content

Commit

Permalink
move stub into new module to reduce kit dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsannm committed Jun 14, 2024
1 parent 9dba8fe commit 91066e2
Show file tree
Hide file tree
Showing 50 changed files with 146 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .fleet/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"editor.guides": []
"editor.guides": [],
"go.imports.params": ""
}
2 changes: 1 addition & 1 deletion cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ wd=$(pwd)


array1=(
contrib kit rony
contrib kit rony stub
std/gateways/fasthttp std/gateways/fastws std/gateways/silverhttp
std/clusters/rediscluster std/clusters/p2pcluster
example/ex-01-rpc example/ex-02-rest example/ex-03-cluster
Expand Down
2 changes: 1 addition & 1 deletion example/ex-01-rpc/cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/clubpay/ronykit/example/ex-01-rpc/dto"
"github.com/clubpay/ronykit/kit"
"github.com/clubpay/ronykit/kit/stub"
"github.com/clubpay/ronykit/stub"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/ex-01-rpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/clubpay/ronykit/example/ex-01-rpc
go 1.20

require (
github.com/clubpay/ronykit v0.7.3
github.com/clubpay/ronykit/kit v0.14.6
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.6
github.com/clubpay/ronykit/std/gateways/fastws v0.14.6
Expand Down Expand Up @@ -31,7 +32,6 @@ require (
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
3 changes: 2 additions & 1 deletion example/ex-01-rpc/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/clubpay/ronykit v0.7.3 h1:Q8H/VVOoHvPyg0aEC61Pt6SKHjYELhnD7uyioHe0/s8=
github.com/clubpay/ronykit v0.7.3/go.mod h1:tkwJK3UtgFpf688cQlE+gypnrI1CDA1bOAqyrNNHoxk=
github.com/clubpay/ronykit/kit v0.14.6 h1:137cCnzMgAkts1/CzFfgReBxjRTB/d3gQ5p0QGBQNWc=
github.com/clubpay/ronykit/kit v0.14.6/go.mod h1:NdIVC65RisZCCU5aACdxtovOVl3Cj+mQhPpUIjyG04Q=
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.6 h1:MB20YVT+MU6hHW6A8YImMz1f9dB2P+PDvycLgH+xkLk=
Expand Down Expand Up @@ -65,7 +67,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
2 changes: 1 addition & 1 deletion example/ex-02-rest/cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/clubpay/ronykit/example/ex-02-rest/dto"
"github.com/clubpay/ronykit/example/ex-02-rest/stub/sampleservice"
"github.com/clubpay/ronykit/kit/stub"
"github.com/clubpay/ronykit/stub"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/ex-02-rest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.20

require (
github.com/bytedance/sonic v1.11.7
github.com/clubpay/ronykit v0.7.3
github.com/clubpay/ronykit/kit v0.14.3
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.3
)
Expand All @@ -30,6 +31,5 @@ require (
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
3 changes: 2 additions & 1 deletion example/ex-02-rest/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
github.com/clubpay/ronykit v0.7.3 h1:Q8H/VVOoHvPyg0aEC61Pt6SKHjYELhnD7uyioHe0/s8=
github.com/clubpay/ronykit v0.7.3/go.mod h1:tkwJK3UtgFpf688cQlE+gypnrI1CDA1bOAqyrNNHoxk=
github.com/clubpay/ronykit/kit v0.14.3 h1:yn9SPxJZLXlshQtQKACbWGyDfUi30zzFP6GKNG04He0=
github.com/clubpay/ronykit/kit v0.14.3/go.mod h1:5GlJkudFSdiMk3xxTS6bsx3WlgGvqHtDAirP8LP6ZN0=
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.3 h1:tG5k/1yTVhEfv21RKpcIHFdYA/HS/ltauxvTExy4BH0=
Expand Down Expand Up @@ -71,7 +73,6 @@ golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
2 changes: 1 addition & 1 deletion example/ex-02-rest/stub/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main

import (
"github.com/clubpay/ronykit/example/ex-02-rest/api"
"github.com/clubpay/ronykit/kit/stub/stubgen"
"github.com/clubpay/ronykit/stubbgen"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/ex-02-rest/stub/sampleservice/stub.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/ex-04-stubgen/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var SampleDesc desc.ServiceDescFunc = func() *desc.Service {
SetOutput(&dto.VeryComplexResponse{}).
NamedSelector("ComplexDummy", fasthttp.POST("/complexDummy")).
NamedSelector("ComplexDummy2", fasthttp.POST("/complexDummy/:key1")).
NamedSelector("ComplexDummy3", fasthttp.RPC("complexDummy")).
AddModifier(func(envelope *kit.Envelope) {
envelope.SetHdr("X-Custom-Header", "justForTestingModifier")
}).
Expand All @@ -30,6 +31,7 @@ var SampleDesc desc.ServiceDescFunc = func() *desc.Service {
SetInput(&dto.VeryComplexRequest{}).
SetOutput(&dto.VeryComplexResponse{}).
NamedSelector("GetComplexDummy", fasthttp.GET("/complexDummy/:key1/xs/:sKey1")).
NamedSelector("GetComplexDummy2", fasthttp.RPC("getComplexDummy")).
AddModifier(func(envelope *kit.Envelope) {
envelope.SetHdr("X-Custom-Header", "justForTestingModifier")
}).
Expand Down
2 changes: 1 addition & 1 deletion example/ex-04-stubgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/clubpay/ronykit/example/ex-04-stubgen
go 1.20

require (
github.com/clubpay/ronykit v0.7.3
github.com/clubpay/ronykit/kit v0.14.3
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.3
)
Expand All @@ -23,6 +24,5 @@ require (
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
3 changes: 2 additions & 1 deletion example/ex-04-stubgen/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/clubpay/ronykit v0.7.3 h1:Q8H/VVOoHvPyg0aEC61Pt6SKHjYELhnD7uyioHe0/s8=
github.com/clubpay/ronykit v0.7.3/go.mod h1:tkwJK3UtgFpf688cQlE+gypnrI1CDA1bOAqyrNNHoxk=
github.com/clubpay/ronykit/kit v0.14.3 h1:yn9SPxJZLXlshQtQKACbWGyDfUi30zzFP6GKNG04He0=
github.com/clubpay/ronykit/kit v0.14.3/go.mod h1:5GlJkudFSdiMk3xxTS6bsx3WlgGvqHtDAirP8LP6ZN0=
github.com/clubpay/ronykit/std/gateways/fasthttp v0.14.3 h1:tG5k/1yTVhEfv21RKpcIHFdYA/HS/ltauxvTExy4BH0=
Expand Down Expand Up @@ -46,7 +48,6 @@ golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
2 changes: 1 addition & 1 deletion example/ex-04-stubgen/stub/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main

import (
"github.com/clubpay/ronykit/example/ex-04-stubgen/api"
"github.com/clubpay/ronykit/kit/stub/stubgen"
"github.com/clubpay/ronykit/stubbgen"
)

func main() {
Expand Down
8 changes: 7 additions & 1 deletion example/ex-04-stubgen/stub/sampleservice/stub.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.22
go 1.22.3

use (
./contrib
Expand All @@ -17,5 +17,6 @@ use (
./std/gateways/fasthttp
./std/gateways/fastws
./std/gateways/silverhttp
./stub
./testenv
)
7 changes: 7 additions & 0 deletions kit/conn.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package kit

import "io"

// Conn represents a connection between EdgeServer and client.
type Conn interface {
ConnID() uint64
Expand All @@ -25,3 +27,8 @@ type RESTConn interface {
Redirect(code int, url string)
WalkQueryParams(fn func(key string, val string) bool)
}

type RPCConn interface {
Conn
io.Writer
}
1 change: 1 addition & 0 deletions kit/ctx_testkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (testCtx *TestContext) Run(stream bool) error {
return testCtx.expectFunc(conn.out...)
}

// RunREST simulates a REST request.
func (testCtx *TestContext) RunREST() error {
ctx := newContext(&testCtx.ls)
conn := newTestRESTConn()
Expand Down
8 changes: 1 addition & 7 deletions kit/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,25 @@ module github.com/clubpay/ronykit/kit
go 1.19

require (
github.com/fasthttp/websocket v1.5.9
github.com/goccy/go-json v0.10.3
github.com/goccy/go-reflect v1.2.0
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/onsi/ginkgo/v2 v2.18.0
github.com/onsi/gomega v1.33.1
github.com/valyala/fasthttp v1.54.0
golang.org/x/net v0.25.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.21.0 // indirect
Expand Down
12 changes: 0 additions & 12 deletions kit/go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/fasthttp/websocket v1.5.9 h1:9deGuzYcCRKjk940kNwSN6Hd14hk4zYwropm4UsUIUQ=
github.com/fasthttp/websocket v1.5.9/go.mod h1:NLzHBFur260OMuZHohOfYQwMTpR7sfSpUnuqKxMpgKA=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
Expand All @@ -18,8 +14,6 @@ github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQN
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+UV8OU=
github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand All @@ -41,14 +35,8 @@ github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511 h1:KanIMPX0QdEdB4R3CiimCAbxFrhB3j7h0/OvpYGVQa8=
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511/go.mod h1:sM7Mt7uEoCeFSCBM+qBrqvEo+/9vdmj19wzp3yzUhmg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.54.0 h1:cCL+ZZR3z3HPLMVfEYVUMtJqVaui0+gu7Lx63unHwS0=
github.com/valyala/fasthttp v1.54.0/go.mod h1:6dt4/8olwq9QARP/TDuPmWyWcl4byhpvTJ4AAtcz+QM=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
Expand Down
1 change: 0 additions & 1 deletion std/clusters/rediscluster/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ linters:
- testpackage
- tagliatelle
- exhaustruct
- maligned
- wrapcheck
- varnamelen
- ireturn
Expand Down
5 changes: 4 additions & 1 deletion std/gateways/fasthttp/conn_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ type wsConn struct {
rpcOutFactory kit.OutgoingRPCFactory
}

var _ kit.Conn = (*wsConn)(nil)
var (
_ kit.Conn = (*wsConn)(nil)
_ kit.RPCConn = (*wsConn)(nil)
)

func (w *wsConn) Close() {
w.Lock()
Expand Down
5 changes: 4 additions & 1 deletion std/gateways/fastws/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ type wsConn struct {
w *wsutil.Writer
}

var _ kit.Conn = (*wsConn)(nil)
var (
_ kit.Conn = (*wsConn)(nil)
_ kit.RPCConn = (*wsConn)(nil)
)

func newWebsocketConn(
id uint64, c gnet.Conn,
Expand Down
4 changes: 2 additions & 2 deletions kit/stub/README.MD → stub/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"context"
"net/http"

"github.com/clubpay/ronykit/kit/stub"
"github.com/clubpay/ronykit/stub"
)

func main() {
Expand Down Expand Up @@ -43,7 +43,7 @@ import (
"context"

"github.com/clubpay/ronykit/kit"
"github.com/clubpay/ronykit/kit/stub"
"github.com/clubpay/ronykit/stub"
)

type ErrorMessage struct {
Expand Down
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions stub/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module github.com/clubpay/ronykit/stub

go 1.19

require (
github.com/clubpay/ronykit/kit v0.14.14
github.com/fasthttp/websocket v1.5.9
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/valyala/fasthttp v1.54.0
golang.org/x/net v0.26.0
)

require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/goccy/go-reflect v1.2.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/jedib0t/go-pretty/v6 v6.5.9 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 91066e2

Please sign in to comment.