21 lines
376 B
Go
21 lines
376 B
Go
|
package subscriber
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"github.com/micro/go-micro/util/log"
|
||
|
|
||
|
foo "foo/proto/foo"
|
||
|
)
|
||
|
|
||
|
type Foo struct{}
|
||
|
|
||
|
func (e *Foo) Handle(ctx context.Context, msg *foo.Message) error {
|
||
|
log.Log("Handler Received message: ", msg.Say)
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func Handler(ctx context.Context, msg *foo.Message) error {
|
||
|
log.Log("Function Received message: ", msg.Say)
|
||
|
return nil
|
||
|
}
|