Module | Facter::Core::Resolvable |
In: |
lib/facter/core/resolvable.rb
|
timeout | [RW] | The timeout, in seconds, for evaluating this resolution. @return [Integer] @api public |
Return the timeout period for resolving a value. (see timeout) @return [Numeric] @comment requiring ‘timeout’ stdlib class causes Object#timeout to be
defined which delegates to Timeout.timeout. This method may potentially overwrite the #timeout attr_reader on this class, so we define #limit to avoid conflicts.
on_flush accepts a block and executes the block when the resolution‘s value is flushed. This makes it possible to model a single, expensive system call inside of a Ruby object and then define multiple dynamic facts which resolve by sending messages to the model instance. If one of the dynamic facts is flushed then it can, in turn, flush the data stored in the model instance to keep all of the dynamic facts in sync without making multiple, expensive, system calls.
Please see the Solaris zones fact for an example of how this feature may be used.
@see Facter::Util::Fact#flush @see Facter::Util::Resolution#flush
@api public