mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-06 22:06:19 +02:00
21 lines
438 B
Go
21 lines
438 B
Go
|
package subscriber
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"github.com/micro/go-micro/v2/util/log"
|
||
|
|
||
|
example "github.com/micro/examples/template/srv/proto/example"
|
||
|
)
|
||
|
|
||
|
type Example struct{}
|
||
|
|
||
|
func (e *Example) Handle(ctx context.Context, msg *example.Message) error {
|
||
|
log.Log("Handler Received message: ", msg.Say)
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func Handler(ctx context.Context, msg *example.Message) error {
|
||
|
log.Log("Function Received message: ", msg.Say)
|
||
|
return nil
|
||
|
}
|