mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
One
This commit is contained in:
17
helloworld/handler/helloworld.go
Normal file
17
helloworld/handler/helloworld.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/micro/micro/v3/service/logger"
|
||||
helloworld "github.com/micro/services/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 {
|
||||
logger.Info("Received Helloworld.Call request")
|
||||
rsp.Msg = "Hello " + req.Name
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user