mirror of
https://github.com/go-micro/go-micro.git
synced 2025-03-23 20:32:32 +02:00
21 lines
402 B
Go
21 lines
402 B
Go
|
package subscriber
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
|
||
|
"context"
|
||
|
example "github.com/micro/examples/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
|
||
|
}
|