server

package
v0.0.0-...-3aa26a6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollInterval = 60 // how often to poll api
	DefaultErrTimeout   = 10 // back-off timeout on error
	DefaultEtcdEndpoint = "http://127.0.0.1:2379"
	DefaultEtcdEnable   = false
)
View Source
const Version = "0.0.2"

Version represents the semver of the server

Variables

View Source
var (
	// ErrWatchCat contains the error for the WatchCat
	ErrWatchCat           = errors.New("Watchcat: Could not get the cat in the oven")
	ErrNoIdentityDocument = errors.New("Watchcat: No instance identity document available")
)
View Source
var (
	Verbose      bool
	EtcdEnable   bool
	EtcdEndpoint string
	PollInterval int
	ErrTimeout   int
)

Functions

func Run

func Run(cmd *cobra.Command, args []string) error

Run is taking the commands is running the server

Types

type WatchCat

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

WatchCat wraps the state of the watch cat

func NewWatchCat

func NewWatchCat(ctx context.Context, pollTimeout time.Duration, errTimeout time.Duration) (*WatchCat, error)

NewWatchCat wraps the generation of a new watchcat

type WatchDog

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

WatchDog holds the state of the watchdog

func NewWatchDog

func NewWatchDog(timer *time.Ticker) *WatchDog

NewWatchDog wrappes the creation of a new WatchDog

Jump to

Keyboard shortcuts

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