1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00
go-micro/util/http/http.go
Vasiliy Tolstov f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00

24 lines
392 B
Go

package http
import (
"net/http"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/registry"
)
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,
}
}