mirror of
https://github.com/qdm12/gluetun.git
synced 2025-12-10 20:07:32 -06:00
31 lines
694 B
Go
31 lines
694 B
Go
package privatevpn
|
|
|
|
import (
|
|
"math/rand"
|
|
|
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
|
"github.com/qdm12/gluetun/internal/provider/common"
|
|
"github.com/qdm12/gluetun/internal/provider/privatevpn/updater"
|
|
)
|
|
|
|
type Provider struct {
|
|
storage common.Storage
|
|
randSource rand.Source
|
|
common.Fetcher
|
|
}
|
|
|
|
func New(storage common.Storage, randSource rand.Source,
|
|
unzipper common.Unzipper, updaterWarner common.Warner,
|
|
parallelResolver common.ParallelResolver,
|
|
) *Provider {
|
|
return &Provider{
|
|
storage: storage,
|
|
randSource: randSource,
|
|
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
|
}
|
|
}
|
|
|
|
func (p *Provider) Name() string {
|
|
return providers.Privatevpn
|
|
}
|