-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59324e6
commit f5ba230
Showing
4 changed files
with
14 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
package dnssvc | ||
|
||
import "github.com/c2h5oh/datasize" | ||
|
||
// CacheConfig is the configuration for the DNS results cache. | ||
type CacheConfig struct { | ||
// Enabled specifies if the cache should be used. | ||
Enabled bool | ||
|
||
// Size is the maximum size of the common cache. | ||
Size datasize.ByteSize | ||
// | ||
// TODO(e.burkov): Make it a [datasize.ByteSize] when dnsproxy uses it. | ||
Size int | ||
|
||
// ClientSize is the maximum size of each per-client cache. | ||
ClientSize datasize.ByteSize | ||
// | ||
// TODO(e.burkov): Make it a [datasize.ByteSize] when dnsproxy uses it. | ||
ClientSize int | ||
} | ||
|
||
// TODO(e.burkov): Add tests. |
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