Documentation ¶
Index ¶
- type Config
- type Factd
- func (f *Factd) AddFact(group string, id string, fact interface{})
- func (f *Factd) Collect()
- func (f *Factd) Delete(k string)
- func (f *Factd) Format() (*bytes.Buffer, error)
- func (f *Factd) Get(group string, k string) (interface{}, bool)
- func (f *Factd) GetConfig() Config
- func (f *Factd) MergeSet(k string, v common.FactList)
- func (f *Factd) Print() error
- func (f *Factd) ReplaceSet(k string, v common.FactList)
- func (f *Factd) ReporterProcessor()
- func (f *Factd) RunReporters()
- func (f *Factd) SetConfig(c Config)
- func (f *Factd) StopReporters()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Formatter formatter.Formatter Plugins map[string]plugin.Plugin Output *io.Writer }
Config struct serves to pass Factd configuration
type Factd ¶
type Factd struct {
// contains filtered or unexported fields
}
Factd struct holds Factd-related attributes
func (*Factd) Collect ¶
func (f *Factd) Collect()
Collect facts from each active plugin and add them to the plugin result array
func (*Factd) Format ¶
Format returns the formatted result of the facts as a pointer to a bytes.Buffer
func (*Factd) Print ¶
Print facts by calling selected formatter and printing returned buffer to f.Config.Output as a string
func (*Factd) ReplaceSet ¶
ReplaceSet replaces all facts for key k
func (*Factd) ReporterProcessor ¶
func (f *Factd) ReporterProcessor()
ReporterProcessor is responsible for acting on information passed to the report channel it will trigger the listeners with the provided fact BEFORE it merges the new fact into the parent set
func (*Factd) RunReporters ¶
func (f *Factd) RunReporters()
RunReporters starts all of the activeReporters in goroutines It additionally starts the reporter processor which will listen for channel input and merge it with existing reports
func (*Factd) StopReporters ¶
func (f *Factd) StopReporters()
StopReporters will close the report channel