Skip to content

Commit

Permalink
dedup http
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloGrayson committed Dec 27, 2016
1 parent 337aaa1 commit bee45b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/examples/thrift-hello/hello/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ func main() {
// configure a dispatcher for the service "hello",
// expose the service over an HTTP inbound on port 8086,
// and configure outbound calls to service "hello" over HTTP port 8086 as well
http := http.NewTransport()
dispatcher := yarpc.NewDispatcher(yarpc.Config{
Name: "hello",
Inbounds: yarpc.Inbounds{
http.NewTransport().NewInbound(":8086"),
http.NewInbound(":8086"),
},
Outbounds: yarpc.Outbounds{
"hello": {
Unary: http.NewTransport().NewSingleOutbound("http://127.0.0.1:8086"),
Unary: http.NewSingleOutbound("http://127.0.0.1:8086"),
},
},
})
Expand Down

0 comments on commit bee45b3

Please sign in to comment.