Skip to content
Permalink
Browse files

自定义Server

  • Loading branch information...
hb-chen committed Oct 13, 2019
1 parent e76368b commit 5f7de50b10c19e19ef546144d6a11adf69ad1cfd
Showing with 8 additions and 0 deletions.
  1. +4 −0 example/api/main.go
  2. +4 −0 example/srv/main.go
@@ -21,7 +21,11 @@ func main() {
)

// Initialise service
service.Init()
service.Init(
micro.Name("go.micro.api.example"),
micro.Version("latest"),

// create wrap for the Example srv client
micro.WrapHandler(client.ExampleWrapper(service)),
)
@@ -18,6 +18,10 @@ func main() {

// Initialise service
service.Init()
service.Init(
micro.Name("go.micro.srv.example"),
micro.Version("latest"),
)

// Register Handler
example.RegisterExampleHandler(service.Server(), new(handler.Example))

0 comments on commit 5f7de50

Please sign in to comment.
You can’t perform that action at this time.