21 lines
428 B
Go
Raw Normal View History

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