Documentation
¶
Overview ¶
Package channel implements the channel interface
Index ¶
- func AllDone()
- func ConfigAllChannels()
- func GetAllChannels() map[string]*Channel
- func GetNotifiers(channel []string) map[string]notify.Notify
- func IsDryNotify() bool
- func SetChannel(name string)
- func SetDryNotify(dry bool)
- func SetNotifiers(notifiers []notify.Notify)
- func SetNotify(channel string, n notify.Notify)
- func SetProber(channel string, p probe.Prober)
- func SetProbers(probers []probe.Prober)
- func WatchForAllEvents()
- type Channel
- func (c *Channel) Channel() chan probe.Result
- func (c *Channel) Config()
- func (c *Channel) Done() chan bool
- func (c *Channel) GetNotify(name string) notify.Notify
- func (c *Channel) GetProber(name string) probe.Prober
- func (c *Channel) Send(result probe.Result)
- func (c *Channel) SetNotifiers(notifiers []notify.Notify)
- func (c *Channel) SetNotify(n notify.Notify)
- func (c *Channel) SetProber(p probe.Prober)
- func (c *Channel) SetProbers(probers []probe.Prober)
- func (c *Channel) WatchEvent(wg *sync.WaitGroup)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotifiers ¶
GetNotifiers returns all of the notifiers by a list of channel names
func SetNotifiers ¶
SetNotifiers set a notify to the channel
func WatchForAllEvents ¶
func WatchForAllEvents()
WatchForAllEvents watch the event for all channels
Types ¶
type Channel ¶
type Channel struct { Name string `yaml:"name"` // unique name Probers map[string]probe.Prober `yaml:"probers"` // probers Notifiers map[string]notify.Notify `yaml:"notifiers"` // notifiers // contains filtered or unexported fields }
Channel implements a config for Channel
func NewEmpty ¶
NewEmpty creates a new empty Channel object with nil channel After setup the probers, You have to call Config() to create the channel
func (*Channel) SetNotifiers ¶
SetNotifiers sets the Notify objects
func (*Channel) SetProbers ¶
SetProbers sets the Notify objects
func (*Channel) WatchEvent ¶
WatchEvent watches the notification event Go through all of notification to notify the result.
Click to show internal directories.
Click to hide internal directories.