ip/resolver/manager.go: make jsonip be a basic_http service with jsonipDecoder decoder function.
This commit is contained in:
parent
42d5d57314
commit
6c696ced3d
1 changed files with 5 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"dnsupdater/ip/resolver/basic_http"
|
"dnsupdater/ip/resolver/basic_http"
|
||||||
"dnsupdater/ip/resolver/jsonip"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var services []Service
|
var services []Service
|
||||||
|
|
@ -23,7 +22,11 @@ func Get(name string) Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Provide(jsonip.New())
|
Provide(&basic_http.Service{
|
||||||
|
ServiceName: "jsonip",
|
||||||
|
Url: "https://jsonip.com",
|
||||||
|
Decoder: JsonipDecoder,
|
||||||
|
})
|
||||||
|
|
||||||
Provide(&basic_http.Service{
|
Provide(&basic_http.Service{
|
||||||
ServiceName: "ifconfig.me",
|
ServiceName: "ifconfig.me",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue