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

Banner Service Integration into Microservice Demo + Banner Call from Frontend #2829

Conversation

MaximilianSchreff
Copy link

This PR introduces the integration of the Banner Service into the Microservice Demo project. It sets up the gRPC client for the Banner Service and implements a call to fetch banner data during the loading of the homepage in the frontend.


Key Changes:

  1. Banner Service Client Integration:

    • Added a gRPC client for the Banner Service using the generated protobuf and gRPC stubs (bannerpb).
    • Configured the client initialization in main.go, fetching the service address (BANNER_SERVICE_ADDR) from environment variables.
  2. gRPC Call to GetCurrentBanner:

    • Updated homeHandler in handlers.go to call the GetCurrentBanner method of the Banner Service.
    • Hardcoded Location parameter for the banner request as "DE" for now.
  3. Environment Configuration:

    • Ensured the BANNER_SERVICE_ADDR is injected through environment variables.
    • Verified compatibility with Skaffold and Kubernetes deployment setups.
  4. Data Injection:

    • The banner data (Title, Description, Image, ImageFormat) is retrieved from the Banner Service and prepared for injection into the template rendering pipeline.

Next Steps:

  • Inject data: banner data (Title, Description, Image, ImageFormat) is retrieved from the Banner Service and prepared for injection into the template rendering pipeline.
  • Update the HTML templates to display the banner dynamically using the injected data.
  • Add unit tests for the banner integration (mocking the gRPC client).

Testing:

  • Verified the gRPC connection to the Banner Service in a local development environment.

Copy link

google-cla bot commented Dec 18, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant