Documentation ¶
Overview ¶
Package tracer provides basic functionalities to monitor a network address until it is online.
Index ¶
Constants ¶
View Source
const ( StatusRunning = iota StatusStopped )
Possible Tracer status value.
View Source
const ( ConnOnline = iota ConnOffline )
Possible connection states.
View Source
const (
TopicConn = "topic_connection"
)
Topic used to publish connectin discovery messgages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSub ¶
type PubSub interface { Sub(cmd *pubsub.Command) (pubsub.CancelFunc, error) Pub(message interface{}, topic string) }
PubSub describes the required functionalities of a publication/subscription object.
type Tracer ¶
type Tracer struct { PubSub RefreshRate time.Duration sync.Mutex // contains filtered or unexported fields }
Tracer can monitor remote interfaces until they're up.
func (*Tracer) Close ¶
func (t *Tracer) Close()
Close makes the tracer pass from status running to status stopped.
func (*Tracer) Run ¶
Run makes the tracer listen for refresh calls and perform ping operations on each connection that is labeled with pending. Quits immediately when Close is called, runs in its own gorountine.
Click to show internal directories.
Click to hide internal directories.