Skip to content

[public-api-server] Simple gRPC server #9290

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

Merged
merged 1 commit into from
Apr 13, 2022
Merged

[public-api-server] Simple gRPC server #9290

merged 1 commit into from
Apr 13, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Apr 13, 2022

Description

Extends public-api-server with a simple gRPC server. The server doesn't have any services any starts up. This is intended to move us along and allow us to iterate, rather than be a complete and final result.

Graceful shutdown of servers is outside of the scope of this PR and will be tackled in subsequent ones.

Related Issue(s)

Part of #9229

How to test

cd components/public-api-server && go run main.go

Serving HTTP :9000
Serving gRPC [::]:9001
^CReceived termination signal, shutting down.

Release Notes

NONE

Documentation

NONE

@easyCZ easyCZ requested a review from a team April 13, 2022 08:41
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 13, 2022
Comment on lines +23 to +27
addr := ":9000"
fmt.Println("Serving HTTP", addr)
err := http.ListenAndServe(addr, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte(`hello world\n`))
}))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this http server in addition to the GRPC server below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We'll need to serve metrics, ready/health endpoints etc

andrew-farries
andrew-farries previously approved these changes Apr 13, 2022
 Please enter the commit message for your changes. Lines starting
@roboquat roboquat merged commit 81b9ad4 into main Apr 13, 2022
@roboquat roboquat deleted the mp/papi-grpc-server branch April 13, 2022 09:38
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants