Maint: dns package interface rework
- return concrete struct type - split interface is sub-interfaces
This commit is contained in:
@@ -6,14 +6,23 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/configuration"
|
||||
)
|
||||
|
||||
func (l *looper) GetSettings() (settings configuration.DNS) { return l.state.GetSettings() }
|
||||
type SettingsGetterSetter interface {
|
||||
SettingsGetter
|
||||
SettingsSetter
|
||||
}
|
||||
|
||||
type SettingsGetter interface {
|
||||
GetSettings() (settings configuration.DNS)
|
||||
}
|
||||
|
||||
func (l *Loop) GetSettings() (settings configuration.DNS) { return l.state.GetSettings() }
|
||||
|
||||
type SettingsSetter interface {
|
||||
SetSettings(ctx context.Context, settings configuration.DNS) (
|
||||
outcome string)
|
||||
}
|
||||
|
||||
func (l *looper) SetSettings(ctx context.Context, settings configuration.DNS) (
|
||||
func (l *Loop) SetSettings(ctx context.Context, settings configuration.DNS) (
|
||||
outcome string) {
|
||||
return l.state.SetSettings(ctx, settings)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user