Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContinuousEngine ¶
type ContinuousEngine struct {
// contains filtered or unexported fields
}
ContinuousEngine represents an engine which runs multiple discoverers continuously.
func NewContinuousEngine ¶
func NewContinuousEngine(opts ...ContinuousEngineOption) *ContinuousEngine
NewContinuousEngine returns a new ContinuousEngine, initialized with the given options.
func (*ContinuousEngine) Run ¶
func (cd *ContinuousEngine) Run( ctx context.Context, results chan<- *discovery.Result, )
Run runs the ContinuousEngine and closes the results channel after the continuous run of all the underlying discoverers is completed. ** This will only ever happen when the given context is done **
type ContinuousEngineOption ¶
type ContinuousEngineOption func(*ContinuousEngine)
ContinuousEngineOption is an input option for the ContinuousEngine constructor.
func WithDiscoverer ¶ added in v0.1.2
func WithDiscoverer(discoverer discovery.Discoverer, opts ...DiscovererOption) ContinuousEngineOption
WithDiscoverer is a configuration option to include an additional Discoverer in a ContinuousEngine's discovery jobs.
type DiscovererOption ¶ added in v0.1.2
type DiscovererOption func(*discovererConfig)
DiscovererOption is an input option for ContinuousEngine's WithDiscoverer().
func WithInitialInterval ¶ added in v0.1.2
func WithInitialInterval(interval time.Duration) DiscovererOption
WithInitialInterval sets a non-default initial interval for a ContinuousEngine's discoverer.
func WithIntervalChannel ¶ added in v0.1.2
func WithIntervalChannel(intervalC <-chan time.Duration) DiscovererOption
WithIntervalChannel sets the interval (updates) channel for a ContinuousEngine's discoverer.
func WithTriggerChannel ¶ added in v0.1.2
func WithTriggerChannel(triggerC <-chan struct{}) DiscovererOption
WithTriggerChannel sets the trigger (manual triggers) channel for a ContinuousEngine's discoverer.
type OneOffEngine ¶
type OneOffEngine struct {
// contains filtered or unexported fields
}
OneOffEngine represents an engine to run one-off discovery jobs.
func NewOneOffEngine ¶
func NewOneOffEngine(opts ...OneOffEngineOption) *OneOffEngine
NewOneOffEngine returns a new OneOffEngine, initialized with the given options.
type OneOffEngineOption ¶
type OneOffEngineOption func(*OneOffEngine)
OneOffEngineOption is an input option for the OneOffEngine constructor.
func OneOffEngineOptionWithDiscoverers ¶
func OneOffEngineOptionWithDiscoverers(discoverers ...discovery.Discoverer) OneOffEngineOption
OneOffEngineOptionWithDiscoverers is a configuration option to include additional Discoverer(s) in a OneOffEngine's discovery jobs.