Skip to content

subzero112233/golang-twirp

Repository files navigation

twirp-app

for the REST api do:

export API_TYPE=rest

Start the application:

   go run cmd/main.go

Initiate an rpc GetStats request:

 | protoc - encode stats.GetStatsRequest ./rpc/stats/stats.proto \
 | curl -s - request POST \
 - header "Content-Type: application/protobuf" \
 - data-binary @- \
 http://localhost:8000/twirp/stats.StatsService/GetStats \
 | protoc - decode stats.GetStatsResponse ./rpc/stats/stats.proto

Initiate both GetStats and AddStats using the client:

go run example/example.go

Benchmark:

go test -bench=. -benchtime=5000x

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages