deadman

package
v0.13.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default deadman's switch interval
	DefaultInterval = toml.Duration(time.Second * 10)
	// Default deadman's switch threshold
	DefaultThreshold = float64(0)
	// Default deadman's switch id
	DefaultId = "{{ .Group }}:NODE_NAME for task '{{ .TaskName }}'"
	// Default deadman's switch message
	DefaultMessage = "" /* 135-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval  toml.Duration `toml:"interval"`
	Threshold float64       `toml:"threshold"`
	Id        string        `toml:"id"`
	Message   string        `toml:"message"`
	Global    bool          `toml:"global"`
}

func NewConfig

func NewConfig() Config

type Service

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

func NewService

func NewService(c Config, l *log.Logger) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Global

func (s *Service) Global() bool

func (*Service) Id

func (s *Service) Id() string

func (*Service) Interval

func (s *Service) Interval() time.Duration

func (*Service) Message

func (s *Service) Message() string

func (*Service) Open

func (s *Service) Open() error

func (*Service) Threshold

func (s *Service) Threshold() float64

Jump to

Keyboard shortcuts

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