Skip to content

Instantly share code, notes, and snippets.

@asim
Created September 5, 2016 12:59
Show Gist options
  • Save asim/027c1990eb5ee2ddc32bda401a8c0418 to your computer and use it in GitHub Desktop.
Save asim/027c1990eb5ee2ddc32bda401a8c0418 to your computer and use it in GitHub Desktop.
package main
import (
"time"
"github.com/micro/go-micro/client"
example "github.com/micro/micro/examples/template/srv/proto/example"
"golang.org/x/net/context"
)
func main() {
p := client.NewPublication("topic.go.micro.srv.template", &example.Message{Say: "hello"})
client.Publish(context.TODO(), p)
time.Sleep(time.Second)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment