Add pub/sub to client/server and make broker more low level

This commit is contained in:
Asim
2015-06-12 19:52:27 +01:00
parent cdf2f2cbcd
commit b91af916f9
24 changed files with 542 additions and 193 deletions

View File

@@ -0,0 +1,18 @@
package subscriber
import (
log "github.com/golang/glog"
example "github.com/myodc/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(msg *example.Message) {
log.Info("Function Received message: ", msg.Say)
}