overwatch

package
v0.0.0-...-7cb0e1f Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Overwatch package is responsible for:

  • listening for bad events from components
  • gracefully stopping all affected components
  • watching and waiting for the dependency to recover
  • starting all components back up

Index

Constants

View Source
const (
	WATCH_RETRY_INTERVAL  = time.Duration(5) * time.Second
	HEALTH_WATCH_DURATION = time.Duration(10) * time.Second

	ETCD_WATCHER_ERROR int = iota
	ETCD_GENERIC_ERROR
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Source    string
	Error     error
	ErrorType int
}

type Overwatch

type Overwatch struct {
	Config       *config.Config
	WatchChannel <-chan *Message
	Looper       director.Looper
	WatchLooper  director.Looper
	Components   []base.IComponent

	Log log.FieldLogger

	base.Component
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, watchChannel <-chan *Message, components []base.IComponent) *Overwatch

func (*Overwatch) Start

func (o *Overwatch) Start() error

func (*Overwatch) Stop

func (o *Overwatch) Stop() error

TODO

Jump to

Keyboard shortcuts

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