Documentation ¶
Index ¶
- Variables
- func ActivePlugin(name string, b ActiveBuilder) map[string][]interface{}
- func MakePingAllIPFactory(fields common.MapStr, f func(*net.IPAddr) []func() (common.MapStr, error)) func(*net.IPAddr) TaskRunner
- func MakePingAllIPPortFactory(fields common.MapStr, ports []uint16, ...) func(*net.IPAddr) TaskRunner
- func MakePingIPFactory(fields common.MapStr, f func(*net.IPAddr) (common.MapStr, error)) func(*net.IPAddr) TaskRunner
- func RegisterActive(name string, builder ActiveBuilder)
- type ActiveBuilder
- type Factory
- type IPSettings
- type Info
- type Job
- func MakeByHostJob(name, typ string, host string, settings IPSettings, ...) (Job, error)
- func MakeByIPJob(name, typ string, ip net.IP, pingFactory func(ip *net.IPAddr) TaskRunner) (Job, error)
- func MakeJob(name, typ string, f func() (common.MapStr, []TaskRunner, error)) Job
- func MakeSimpleJob(name, typ string, f func() (common.MapStr, error)) Job
- type PingMode
- type Registrar
- type TaskRunner
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultIPSettings = IPSettings{ IPv4: true, IPv6: true, Mode: PingAny, }
View Source
var Registry = newRegistrar()
Functions ¶
func ActivePlugin ¶
func ActivePlugin(name string, b ActiveBuilder) map[string][]interface{}
func MakePingAllIPFactory ¶
func MakePingIPFactory ¶
func RegisterActive ¶
func RegisterActive(name string, builder ActiveBuilder)
Types ¶
type IPSettings ¶
type IPSettings struct { IPv4 bool `config:"ipv4"` IPv6 bool `config:"ipv6"` Mode PingMode `config:"mode"` }
func (IPSettings) Network ¶
func (s IPSettings) Network() string
type Job ¶
type Job interface { Name() string TaskRunner }
func MakeByHostJob ¶
func MakeByHostJob( name, typ string, host string, settings IPSettings, pingFactory func(ip *net.IPAddr) TaskRunner, ) (Job, error)
func MakeByIPJob ¶
type Registrar ¶
type Registrar struct {
// contains filtered or unexported fields
}
func (*Registrar) AddActive ¶
func (r *Registrar) AddActive(name string, builder ActiveBuilder) error
func (*Registrar) GetFactory ¶
type TaskRunner ¶
type TaskRunner interface {
Run() (common.MapStr, []TaskRunner, error)
}
func MakeCont ¶
func MakeCont(f func() (common.MapStr, []TaskRunner, error)) TaskRunner
func MakeSimpleCont ¶
func MakeSimpleCont(f func() (common.MapStr, error)) TaskRunner
func WithDuration ¶
func WithDuration(name string, r TaskRunner) TaskRunner
func WithFields ¶
func WithFields(fields common.MapStr, r TaskRunner) TaskRunner
Click to show internal directories.
Click to hide internal directories.