Skip to content

Adding gRPC Client Streaming Example #1695

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

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

coolwednesday
Copy link
Contributor

@coolwednesday coolwednesday commented May 6, 2025

@@ -0,0 +1,17 @@
# GRPC Client Example
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# GRPC Client Example
# gRPC Client Example

}

// ServerStreamHandler handles server-side streaming with detailed response tracking
func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (interface{}, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (interface{}, error) {
func (c *ChatHandler) ServerStreamHandler(ctx *gofr.Context) (any, error) {

}

// Return detailed stream information
return map[string]interface{}{
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return map[string]interface{}{
return map[string]any{

Here and everywhere in fact

@@ -0,0 +1,17 @@
# GRPC Client Example
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# GRPC Client Example
# gRPC Client Example

But maybe this, no?

Suggested change
# GRPC Client Example
# gRPC Unary Client Example

//HealthCheck to SayHello Service.
//res, err := g.helloGRPCClient.Check(ctx, &grpc_health_v1.HealthCheckRequest{Service: "Hello"})
//if err != nil {
// HealthCheck to SayHello Service.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why the example comes with commented code

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.

2 participants