watchdog

package
v0.0.0-...-2e50eff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watchdog

type Watchdog struct {
	// contains filtered or unexported fields
}

Watchdog struct

func NewWatchdog

func NewWatchdog(attemps int, checkInterval time.Duration, restartInterval time.Duration, serv *service.Service, notifier *mail.Mail) (*Watchdog, error)

NewWatchdog creates new watchdog struct and initiate its fields

func (*Watchdog) Watch

func (w *Watchdog) Watch()

Watch runs the provided service and next check its status. If service is down, function will try to restart it specified number of times with specified time interval.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL