Audit: some refactoring out of types.go (#25511)

* some refactoring out of types.go

* tests for metrics tag, parallelize other tests
This commit is contained in:
Peter Wilson
2024-02-20 09:56:35 +00:00
committed by GitHub
parent 633dae1a6a
commit 808cdfc2d2
9 changed files with 160 additions and 72 deletions

View File

@@ -10,6 +10,23 @@ import (
"time"
)
// Option is how options are passed as arguments.
type Option func(*options) error
// options are used to represent configuration for a audit related nodes.
type options struct {
withID string
withNow time.Time
withSubtype subtype
withFormat format
withPrefix string
withRaw bool
withElision bool
withOmitTime bool
withHMACAccessor bool
withHeaderFormatter HeaderFormatter
}
// getDefaultOptions returns options with their default values.
func getDefaultOptions() options {
return options{