Documentation ¶
Index ¶
- Constants
- type Config
- type SourceProvider
- func (p SourceProvider) OnTaskUpdate(fn func(*provider.Task) error)
- func (p *SourceProvider) Read() error
- func (p SourceProvider) Stop() error
- func (p SourceProvider) String() string
- func (p SourceProvider) TaskDone(t *provider.Task) error
- func (p SourceProvider) TaskError(t *provider.Task, err error) error
- func (p SourceProvider) TaskStarted(t *provider.Task) error
Constants ¶
View Source
const ( // DefaultEnable is default state for metrics DefaultEnable = true // DefaultSource defines a source file DefaultSource = "/etc/crontab" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SourceProvider ¶
SourceProvider creates a new src provider
func NewSourceProvider ¶
func NewSourceProvider(config Config) *SourceProvider
NewSourceProvider creates a new src provider
func (SourceProvider) OnTaskUpdate ¶
func (p SourceProvider) OnTaskUpdate(fn func(*provider.Task) error)
OnTaskUpdate runs when a task gets updated
func (SourceProvider) String ¶ added in v0.7.0
func (p SourceProvider) String() string
String returns the Providers identity
func (SourceProvider) TaskDone ¶
func (p SourceProvider) TaskDone(t *provider.Task) error
TaskDone will be executed when a task is done
func (SourceProvider) TaskError ¶
func (p SourceProvider) TaskError(t *provider.Task, err error) error
TaskError will be called when an error occured
func (SourceProvider) TaskStarted ¶
func (p SourceProvider) TaskStarted(t *provider.Task) error
TaskStarted will be executed when a task is started
Click to show internal directories.
Click to hide internal directories.