deadman

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 2 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 Diagnostic added in v1.4.0

type Diagnostic interface {
	ConfiguredGlobally()
}

type Service

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

func NewService

func NewService(c Config, d Diagnostic) *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