Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArguments = Arguments{ Type: DetectorFSNotify, PollFrequency: time.Minute, }
DefaultArguments provides the default arguments for the local.file component.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { // Filename indicates the file to watch. Filename string `river:"filename,attr"` // Type indicates how to detect changes to the file. Type Detector `river:"detector,attr,optional"` // PollFrequency determines the frequency to check for changes when Type is // Poll. PollFrequency time.Duration `river:"poll_frequency,attr,optional"` // IsSecret marks the file as holding a secret value which should not be // displayed to the user. IsSecret bool `river:"is_secret,attr,optional"` }
Arguments holds values which are used to configure the local.file component.
func (*Arguments) SetToDefault ¶ added in v0.35.0
func (a *Arguments) SetToDefault()
SetToDefault implements river.Defaulter.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the local.file component.
func (*Component) CurrentHealth ¶
CurrentHealth implements component.HealthComponent.
type Detector ¶
type Detector int
Detector is used to specify how changes to the file should be detected.
const ( // DetectorInvalid indicates an invalid UpdateType. DetectorInvalid Detector = iota // DetectorFSNotify uses filesystem events to wait for changes to the file. DetectorFSNotify // DetectorPoll will re-read the file on an interval to detect changes. DetectorPoll // DetectorDefault holds the default UpdateType. DetectorDefault = DetectorFSNotify )
func (Detector) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Detector) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Exports ¶
type Exports struct { // Content of the file. Content rivertypes.OptionalSecret `river:"content,attr"` }
Exports holds values which are exported by the local.file component.
Click to show internal directories.
Click to hide internal directories.