Created
December 8, 2020 16:32
-
-
Save jmrobles/a3fb479ed40578b69fb4e93102a86365 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package handler | |
import ( | |
"context" | |
log "github.com/micro/micro/v3/service/logger" | |
helloworld "helloworld/proto" | |
) | |
type Helloworld struct{} | |
// Call is a single request handler called via client.Call or the generated client code | |
func (e *Helloworld) Call(ctx context.Context, req *helloworld.Request, rsp *helloworld.Response) error { | |
log.Info("Received Helloworld.Call request") | |
rsp.Msg = "Hello " + req.Name | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment