querylog.go 502 B

1234567891011121314151617181920212223242526272829
  1. package querylog
  2. type QueryLogger interface {
  3. Write(*Entry) error
  4. Close() error
  5. }
  6. type Entry struct {
  7. Time int64
  8. Hostname string `json:",omitempty"` // not filled in by geodns
  9. Origin string
  10. Name string
  11. Qtype uint16
  12. Rcode int
  13. Answers int
  14. Targets []string
  15. AnswerData []string
  16. LabelName string
  17. RemoteAddr string
  18. ClientAddr string
  19. HasECS bool
  20. IsTCP bool
  21. Version string
  22. // todo:
  23. // - GeoDNS version
  24. // - TCP?
  25. // - log the answer data
  26. }