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

Keepalive example #26

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ RUN \
&& cd example/server/ \
&& go build -ldflags='-s -w' -o /semaphore-xds-echo-server . \
&& cd ../client/ \
&& go build -ldflags='-s -w' -o /semaphore-xds-echo-client .
&& go build -ldflags='-s -w' -o /semaphore-xds-echo-client . \
&& cd ../client-on-demand/ \
&& go build -ldflags='-s -w' -o /semaphore-xds-echo-client-on-demand .

FROM alpine:3.15
COPY --from=build /semaphore-xds /semaphore-xds
COPY --from=build /semaphore-xds-echo-server /semaphore-xds-echo-server
COPY --from=build /semaphore-xds-echo-client /semaphore-xds-echo-client
COPY --from=build /semaphore-xds-echo-client-on-demand /semaphore-xds-echo-client-on-demand
ENTRYPOINT [ "/semaphore-xds" ]
1 change: 1 addition & 0 deletions example/client-on-demand/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client-on-demand
270 changes: 270 additions & 0 deletions example/client-on-demand/echo/echo.pb.go

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

17 changes: 17 additions & 0 deletions example/client-on-demand/echo/echo.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

package echo;
option go_package = "github.com/salrashid123/grpc_health_proxy/example/src/echo";

service EchoServer {
rpc SayHello (EchoRequest) returns (EchoReply) {}
rpc SayHelloStream(EchoRequest) returns (stream EchoReply) {}
}

message EchoRequest {
string name = 1;
}

message EchoReply {
string message = 1;
}
Binary file added example/client-on-demand/echo/echo.proto.pb
Binary file not shown.
29 changes: 29 additions & 0 deletions example/client-on-demand/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module github.com/utilitywarehouse/semaphore-xds/example/client-on-demand

go 1.19

require (
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.10
github.com/sirupsen/logrus v1.9.0
google.golang.org/grpc v1.51.0
)

require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute/metadata v0.2.2 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20221128185840-c261a164b73d // indirect
github.com/envoyproxy/go-control-plane v0.10.3 // indirect
github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading