Path: blob/main/component/loki/source/windowsevent/arguments.go
5327 views
package windowsevent12import (3"time"45"github.com/grafana/agent/component/common/loki"6)78// Arguments holds values which are used to configure the loki.source.windowsevent9// component.10type Arguments struct {11Locale int `river:"locale,attr,optional"`12EventLogName string `river:"eventlog_name,attr,optional"`13XPathQuery string `river:"xpath_query,attr,optional"`14BookmarkPath string `river:"bookmark_path,attr,optional"`15PollInterval time.Duration `river:"poll_interval,attr,optional"`16ExcludeEventData bool `river:"exclude_event_data,attr,optional"`17ExcludeUserdata bool `river:"exclude_user_data,attr,optional"`18UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"`19ForwardTo []loki.LogsReceiver `river:"forward_to,attr"`20}2122func defaultArgs() Arguments {23return Arguments{24Locale: 0,25EventLogName: "",26XPathQuery: "*",27BookmarkPath: "",28PollInterval: 3 * time.Second,29ExcludeEventData: false,30ExcludeUserdata: false,31UseIncomingTimestamp: false,32}33}3435// UnmarshalRiver implements river.Unmarshaler.36func (r *Arguments) UnmarshalRiver(f func(v interface{}) error) error {37*r = defaultArgs()3839type arguments Arguments40if err := f((*arguments)(r)); err != nil {41return err42}4344return nil45}464748