Documentation ¶
Overview ¶
Package sourcemgr implements a component managing logs-agent sources (type LogSource). It receives additions and removals of sources from other components, and it informs subscribers of these additions and removals.
Once added to this component, a LogSource must be considered immutable: neither the component having called AddSource, nor any of the subscribers, may modify the source.
All component methods can be called concurrently.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module fx.Option = fx.Module( "comp/logs/internal/sourcemgr", fx.Provide(newSourceMgr), )
Module defines the fx options for this component.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { // Subscribe registers a subscriber for add/remove events. This must be called // before the component starts. Subscribers cannot be unsubscribed. Subscribe() (subscriptions.Subscriber[SourceChange], error) // AddSource adds a new log source. AddSource(*LogSource) // RemoveSource removes an existing log source. RemoveSource(*LogSource) }
Component is the component type.
type SourceChange ¶
type SourceChange struct { // IsAdd is true when the source is being added, and false when it is being removed. IsAdd bool // Source is the source being added or removed. Source *LogSource }
Launcher defines the interface each launcher must satisfy.
Click to show internal directories.
Click to hide internal directories.