mirror of
https://github.com/go-micro/go-micro.git
synced 2025-03-17 20:28:06 +02:00
21 lines
413 B
Go
21 lines
413 B
Go
package subscriber
|
|
|
|
import (
|
|
"log"
|
|
|
|
"context"
|
|
example "github.com/asim/go-micro/examples/v3/server/proto/example"
|
|
)
|
|
|
|
type Example struct{}
|
|
|
|
func (e *Example) Handle(ctx context.Context, msg *example.Message) error {
|
|
log.Print("Handler Received message: ", msg.Say)
|
|
return nil
|
|
}
|
|
|
|
func Handler(ctx context.Context, msg *example.Message) error {
|
|
log.Print("Function Received message: ", msg.Say)
|
|
return nil
|
|
}
|