Skip to content

Commit

Permalink
home: imp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Feb 7, 2024
1 parent 739b158 commit 21ad1ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/home/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ type tlsConfigSettings struct {
}

type queryLogConfig struct {
// DirPath is the custom directory for logs.
// DirPath is the custom directory for logs. If it's empty the default
// directory will be used. See [homeContext.getDataDir].
DirPath string `yaml:"dir_path"`

// Ignored is the list of host names, which should not be written to log.
Expand All @@ -281,7 +282,8 @@ type queryLogConfig struct {
}

type statsConfig struct {
// DirPath is the custom directory for statistics.
// DirPath is the custom directory for statistics. If it's empty the
// default directory will be used. See [homeContext.getDataDir].
DirPath string `yaml:"dir_path"`

// Ignored is the list of host names, which should not be counted.
Expand Down
3 changes: 2 additions & 1 deletion internal/home/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,8 @@ func checkStatsAndQuerylogDirs(
return statsDir, querylogDir, nil
}

// checkDir checks if the path is a directory.
// checkDir checks if the path is a directory. It's used to check for
// misconfiguration at startup.
func checkDir(path string) (err error) {
var fi os.FileInfo
if fi, err = os.Stat(path); err != nil {
Expand Down

0 comments on commit 21ad1ec

Please sign in to comment.