Documentation
¶
Index ¶
Constants ¶
const ( // LoadScale factor scales the output from sysinfo to the correct float // value. LoadScale = 65536 // XXX: is this correct or should it be 65535? )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateTimeFact ¶
type DateTimeFact struct {
// contains filtered or unexported fields
}
DateTimeFact is a fact which returns the current date and time.
func (*DateTimeFact) Close ¶
func (obj *DateTimeFact) Close() error
Close runs some shutdown code for this fact and turns off the stream.
func (*DateTimeFact) Info ¶
func (obj *DateTimeFact) Info() *facts.Info
Info returns some static info about itself.
func (*DateTimeFact) Init ¶
func (obj *DateTimeFact) Init(init *facts.Init) error
Init runs some startup code for this fact.
func (*DateTimeFact) Stream ¶
func (obj *DateTimeFact) Stream() error
Stream returns the changing values that this fact has over time.
type FlipFlopFact ¶
type FlipFlopFact struct {
// contains filtered or unexported fields
}
FlipFlopFact is a fact which flips a bool repeatedly. This is an example fact and is not meant for serious computing. This would be better served by a flip function which you could specify an interval for.
func (*FlipFlopFact) Close ¶
func (obj *FlipFlopFact) Close() error
Close runs some shutdown code for this fact and turns off the stream.
func (*FlipFlopFact) Info ¶
func (obj *FlipFlopFact) Info() *facts.Info
Info returns some static info about itself.
func (*FlipFlopFact) Init ¶
func (obj *FlipFlopFact) Init(init *facts.Init) error
Init runs some startup code for this fact.
func (*FlipFlopFact) Stream ¶
func (obj *FlipFlopFact) Stream() error
Stream returns the changing values that this fact has over time.
type HostnameFact ¶
type HostnameFact struct {
// contains filtered or unexported fields
}
HostnameFact is a function that returns the hostname. TODO: support hostnames that change in the future.
func (*HostnameFact) Close ¶
func (obj *HostnameFact) Close() error
Close runs some shutdown code for this fact and turns off the stream.
func (*HostnameFact) Info ¶
func (obj *HostnameFact) Info() *facts.Info
Info returns some static info about itself.
func (*HostnameFact) Init ¶
func (obj *HostnameFact) Init(init *facts.Init) error
Init runs some startup code for this fact.
func (*HostnameFact) Stream ¶
func (obj *HostnameFact) Stream() error
Stream returns the single value that this fact has, and then closes.
type LoadFact ¶
type LoadFact struct {
// contains filtered or unexported fields
}
LoadFact is a fact which returns the current system load.