chore(resolver): export structs instead of interfaces
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/updater/resolver"
|
||||
)
|
||||
|
||||
func newParallelResolver() (parallelResolver resolver.Parallel) {
|
||||
func newParallelResolver() (parallelResolver *resolver.Parallel) {
|
||||
const (
|
||||
maxFailRatio = 0.1
|
||||
maxDuration = 20 * time.Second
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/updater/resolver/mock_resolver"
|
||||
"github.com/qdm12/gluetun/internal/provider/common"
|
||||
"github.com/qdm12/gluetun/internal/updater/unzip/mock_unzip"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -168,7 +168,7 @@ func Test_Updater_GetServers(t *testing.T) {
|
||||
unzipper.EXPECT().FetchAndExtract(ctx, zipURL).
|
||||
Return(testCase.unzipContents, testCase.unzipErr)
|
||||
|
||||
presolver := mock_resolver.NewMockParallel(ctrl)
|
||||
presolver := common.NewMockParallelResolver(ctrl)
|
||||
if testCase.expectResolve {
|
||||
presolver.EXPECT().Resolve(ctx, testCase.hostsToResolve, testCase.minServers).
|
||||
Return(testCase.hostToIPs, testCase.resolveWarnings, testCase.resolveErr)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package ipvanish
|
||||
|
||||
import (
|
||||
"github.com/qdm12/gluetun/internal/updater/resolver"
|
||||
"github.com/qdm12/gluetun/internal/provider/common"
|
||||
"github.com/qdm12/gluetun/internal/updater/unzip"
|
||||
)
|
||||
|
||||
type Updater struct {
|
||||
unzipper unzip.Unzipper
|
||||
warner Warner
|
||||
presolver resolver.Parallel
|
||||
presolver common.ParallelResolver
|
||||
}
|
||||
|
||||
type Warner interface {
|
||||
|
||||
Reference in New Issue
Block a user