Files
gluetun/internal/provider/ivpn/provider.go

31 lines
679 B
Go
Raw Normal View History

2021-05-31 00:11:16 +00:00
package ivpn
import (
"math/rand"
"net/http"
2021-05-31 00:11:16 +00:00
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/provider/common"
"github.com/qdm12/gluetun/internal/provider/ivpn/updater"
2021-05-31 00:11:16 +00:00
)
type Provider struct {
storage common.Storage
2021-05-31 00:11:16 +00:00
randSource rand.Source
common.Fetcher
2021-05-31 00:11:16 +00:00
}
func New(storage common.Storage, randSource rand.Source,
client *http.Client, updaterWarner common.Warner,
parallelResolver common.ParallelResolver) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
Fetcher: updater.New(client, updaterWarner, parallelResolver),
2021-05-31 00:11:16 +00:00
}
}
func (p *Provider) Name() string {
return providers.Ivpn
}