21 lines
428 B
Go
21 lines
428 B
Go
package subscriber
|
|
|
|
import (
|
|
"log"
|
|
|
|
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 {
|
|
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
|
|
}
|