-
Notifications
You must be signed in to change notification settings - Fork 479
/
types.go
32 lines (27 loc) · 929 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package journal
import (
"time"
"github.com/grafana/agent/component/common/loki"
flow_relabel "github.com/grafana/agent/component/common/relabel"
)
// Arguments are the arguments for the component.
type Arguments struct {
FormatAsJson bool `river:"format_as_json,attr,optional"`
MaxAge time.Duration `river:"max_age,attr,optional"`
Path string `river:"path,attr,optional"`
RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"`
Matches string `river:"matches,attr,optional"`
Receivers []loki.LogsReceiver `river:"forward_to,attr"`
Labels map[string]string `river:"labels,attr,optional"`
}
func defaultArgs() Arguments {
return Arguments{
FormatAsJson: false,
MaxAge: 7 * time.Hour,
Path: "",
}
}
// SetToDefault implements river.Defaulter.
func (r *Arguments) SetToDefault() {
*r = defaultArgs()
}