micro/examples/server/subscriber/subscriber.go

20 lines
448 B
Go
Raw Normal View History

package subscriber
import (
log "github.com/golang/glog"
2015-11-20 19:17:33 +03: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 {
log.Info("Handler Received message: ", msg.Say)
return nil
}
func Handler(ctx context.Context, msg *example.Message) error {
log.Info("Function Received message: ", msg.Say)
return nil
}