Skip to content

Instantly share code, notes, and snippets.

@jmrobles
Created December 8, 2020 16:32
Show Gist options
  • Save jmrobles/a3fb479ed40578b69fb4e93102a86365 to your computer and use it in GitHub Desktop.
Save jmrobles/a3fb479ed40578b69fb4e93102a86365 to your computer and use it in GitHub Desktop.
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