2015-06-12 21:52:27 +03:00
|
|
|
package subscriber
|
|
|
|
|
|
|
|
import (
|
2016-03-14 14:01:10 +03:00
|
|
|
"log"
|
|
|
|
|
2015-11-20 19:17:33 +03:00
|
|
|
example "github.com/micro/go-micro/examples/server/proto/example"
|
2015-06-12 21:52:27 +03:00
|
|
|
"golang.org/x/net/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Example struct{}
|
|
|
|
|
|
|
|
func (e *Example) Handle(ctx context.Context, msg *example.Message) error {
|
2016-03-14 14:01:10 +03:00
|
|
|
log.Print("Handler Received message: ", msg.Say)
|
2015-06-12 21:52:27 +03:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-12-02 20:42:14 +03:00
|
|
|
func Handler(ctx context.Context, msg *example.Message) error {
|
2016-03-14 14:01:10 +03:00
|
|
|
log.Print("Function Received message: ", msg.Say)
|
2015-12-02 20:42:14 +03:00
|
|
|
return nil
|
2015-06-12 21:52:27 +03:00
|
|
|
}
|