forked from AdguardTeam/AdGuardHome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP all: impl dynamic reconfiguration
- Loading branch information
Showing
19 changed files
with
402 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
package aghtest_test | ||
|
||
import ( | ||
"github.com/AdguardTeam/AdGuardHome/internal/aghtest" | ||
"github.com/AdguardTeam/AdGuardHome/internal/next/websvc" | ||
) | ||
|
||
// type check | ||
var _ websvc.ServiceWithConfig[struct{}] = (*aghtest.ServiceWithConfig[struct{}])(nil) | ||
// Put interface checks that cause import cycles here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package svc | ||
|
||
import ( | ||
"net/netip" | ||
|
||
"github.com/AdguardTeam/golibs/timeutil" | ||
) | ||
|
||
// Configuration Structures | ||
|
||
// config is the top-level on-disk configuration structure. | ||
type config struct { | ||
DNS *dnsConfig `yaml:"dns"` | ||
HTTP *httpConfig `yaml:"http"` | ||
// TODO(a.garipov): Use. | ||
SchemaVersion int `yaml:"schema_version"` | ||
// TODO(a.garipov): Use. | ||
DebugPprof bool `yaml:"debug_pprof"` | ||
Verbose bool `yaml:"verbose"` | ||
} | ||
|
||
// dnsConfig is the on-disk DNS configuration. | ||
// | ||
// TODO(a.garipov): Validate. | ||
type dnsConfig struct { | ||
Addresses []netip.AddrPort `yaml:"addresses"` | ||
BootstrapDNS []string `yaml:"bootstrap_dns"` | ||
UpstreamDNS []string `yaml:"upstream_dns"` | ||
UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` | ||
} | ||
|
||
// httpConfig is the on-disk web API configuration. | ||
// | ||
// TODO(a.garipov): Validate. | ||
type httpConfig struct { | ||
Addresses []netip.AddrPort `yaml:"addresses"` | ||
SecureAddresses []netip.AddrPort `yaml:"secure_addresses"` | ||
Timeout timeutil.Duration `yaml:"timeout"` | ||
ForceHTTPS bool `yaml:"force_https"` | ||
} |
Oops, something went wrong.