Skip to content

Commit

Permalink
feat: support batch write
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Sep 12, 2024
1 parent 4f9c5e7 commit 549dd73
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion codec/thrift/gen_code.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kitex -module -stream-v2 github.com/cloudwego/kitex-benchmark ./echo.thrift
kitex -stream-v2 -module github.com/cloudwego/kitex-benchmark ./echo.thrift
7 changes: 3 additions & 4 deletions codec/thrift/kitex_gen/echo/streamserver/client.go

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

11 changes: 6 additions & 5 deletions codec/thrift/kitex_gen/echo/streamserver/server.go

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

9 changes: 3 additions & 6 deletions codec/thrift/kitex_gen/echo/streamserver/streamserver.go

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

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/cloudfoundry/gosigar v1.3.3
github.com/cloudwego/fastpb v0.0.5
github.com/cloudwego/gopkg v0.1.2-0.20240910075652-f542979ecca4
github.com/cloudwego/kitex v0.11.2-0.20240912062752-e5ea2abe7b45
github.com/cloudwego/kitex v0.11.2-0.20240912101306-b74420638cb1
github.com/gogo/protobuf v1.3.2
github.com/juju/ratelimit v1.0.1
github.com/lesismal/arpc v1.2.4
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ github.com/cloudwego/kitex v0.11.2-0.20240912062203-473ea27c61ef h1:XFVTE9VDylte
github.com/cloudwego/kitex v0.11.2-0.20240912062203-473ea27c61ef/go.mod h1:vMmuPwtLs7Sl9SWpQXZakap3ZWruStqZF56etnX33Z8=
github.com/cloudwego/kitex v0.11.2-0.20240912062752-e5ea2abe7b45 h1:i4Lu4nAqjoFKayvnvqpFTLOIE1Tu0tOnmvzt+Lehymw=
github.com/cloudwego/kitex v0.11.2-0.20240912062752-e5ea2abe7b45/go.mod h1:vMmuPwtLs7Sl9SWpQXZakap3ZWruStqZF56etnX33Z8=
github.com/cloudwego/kitex v0.11.2-0.20240912081801-5280af3c393e h1:egsiYPx5dyF3YdkCIRdKr6ivAcOiEDg+cJ8A+1olXSM=
github.com/cloudwego/kitex v0.11.2-0.20240912081801-5280af3c393e/go.mod h1:vMmuPwtLs7Sl9SWpQXZakap3ZWruStqZF56etnX33Z8=
github.com/cloudwego/kitex v0.11.2-0.20240912083747-702cd05fa3ab h1:h/DjvOGO2zHiARDR9QAu84VlBOXjLRrM/ZQIAFZIxuw=
github.com/cloudwego/kitex v0.11.2-0.20240912083747-702cd05fa3ab/go.mod h1:vMmuPwtLs7Sl9SWpQXZakap3ZWruStqZF56etnX33Z8=
github.com/cloudwego/kitex v0.11.2-0.20240912101306-b74420638cb1 h1:XrtEryvJ5r6UxGPyFUldBDsZshdDk/Lhs/UQlFc5cs8=
github.com/cloudwego/kitex v0.11.2-0.20240912101306-b74420638cb1/go.mod h1:vMmuPwtLs7Sl9SWpQXZakap3ZWruStqZF56etnX33Z8=
github.com/cloudwego/localsession v0.0.2 h1:N9/IDtCPj1fCL9bCTP+DbXx3f40YjVYWcwkJG0YhQkY=
github.com/cloudwego/localsession v0.0.2/go.mod h1:kiJxmvAcy4PLgKtEnPS5AXed3xCiXcs7Z+KBHP72Wv8=
github.com/cloudwego/netpoll v0.6.5-0.20240911104114-8a1f5597a920 h1:WT7vsDDb+ammyB7XLmNSS4vKGpPvM2JDl6h34Jj7mY4=
Expand Down
8 changes: 1 addition & 7 deletions streaming/kitex_tts/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ import (
"github.com/cloudwego/kitex/pkg/streamx/provider/ttstream"
)

var _ streamx.BidiStreamingClient[ttstream.Header, ttstream.Trailer, echo.Request, echo.Response] = (*streamx.GenericClientStream[ttstream.Header, ttstream.Trailer, echo.Request, echo.Response])(nil)

type bidiStream struct {
streamx.BidiStreamingClient[ttstream.Header, ttstream.Trailer, echo.Request, echo.Response]
}

func NewKClient(opt *runner.Options) runner.Client {
klog.SetLevel(klog.LevelWarn)

Expand Down Expand Up @@ -69,7 +63,7 @@ func NewKClient(opt *runner.Options) runner.Client {
}

type kClient struct {
client streamserver.ClientInterface
client streamserver.Client
streampool *sync.Pool
reqPool *sync.Pool
}
Expand Down
2 changes: 1 addition & 1 deletion streaming/kitex_tts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
const port = 8002

var (
_ streamserver.ServerInterface = &StreamServerImpl{}
_ streamserver.Server = &StreamServerImpl{}

recorder = perf.NewRecorder("KITEX_TTS@Server")
)
Expand Down

0 comments on commit 549dd73

Please sign in to comment.