Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeartbeatSourceDefault = "" HeartbeatSourceMongo = "mongo" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
func NewAdapter ¶
type Heartbeat ¶
type Heartbeat struct { Pattern map[string]string `bson:"pattern"` ExpectedInterval string `bson:"expected_interval"` Output string `bson:"output"` }
func (*Heartbeat) ToHeartBeatItem ¶
type Item ¶
type Item struct { Mappings map[string]string `toml:"mappings"` MaxDuration time.Duration `toml:"maxduration"` Source string Output string }
Item contains the required informations for the HeartBeat engine to work.
func (*Item) AddMapping ¶
AddMapping simplifies your life to declare a useful HeartBeatItem. You can safely ignore the error, it only says that the mapping you try to insert already exists.
type SafeHeartbeatItems ¶
type SafeHeartbeatItems struct {
// contains filtered or unexported fields
}
func NewSafeHeartbeatItems ¶
func NewSafeHeartbeatItems() SafeHeartbeatItems
func (*SafeHeartbeatItems) AddItem ¶
func (i *SafeHeartbeatItems) AddItem(hi Item)
func (*SafeHeartbeatItems) Clear ¶
func (i *SafeHeartbeatItems) Clear()
func (*SafeHeartbeatItems) Len ¶
func (i *SafeHeartbeatItems) Len() int
func (*SafeHeartbeatItems) Value ¶
func (i *SafeHeartbeatItems) Value() []Item
Click to show internal directories.
Click to hide internal directories.