1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/util/http/http.go
2019-05-30 23:52:10 +01:00

24 lines
379 B
Go

package http
import (
"net/http"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector"
)
func NewRoundTripper(opts ...Option) http.RoundTripper {
options := Options{
Registry: registry.DefaultRegistry,
}
for _, o := range opts {
o(&options)
}
return &roundTripper{
rt: http.DefaultTransport,
st: selector.Random,
opts: options,
}
}