Files
gluetun/internal/provider/privado/provider.go
2024-10-11 19:27:29 +00:00

32 lines
725 B
Go

package privado
import (
"math/rand"
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/provider/common"
"github.com/qdm12/gluetun/internal/provider/privado/updater"
)
type Provider struct {
storage common.Storage
randSource rand.Source
common.Fetcher
}
func New(storage common.Storage, randSource rand.Source,
ipFetcher common.IPFetcher, unzipper common.Unzipper,
updaterWarner common.Warner,
parallelResolver common.ParallelResolver,
) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
Fetcher: updater.New(ipFetcher, unzipper, updaterWarner, parallelResolver),
}
}
func (p *Provider) Name() string {
return providers.Privado
}