sentry

package module
v0.0.0-...-74bc407 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l *slogger.Logger) *slogger.Logger

Types

type Sentry

type Sentry struct {
	Name      string
	LastCheck time.Time
	Deadline  time.Time

	TripwireFunc func(*Sentry)
	// contains filtered or unexported fields
}

func (*Sentry) Activate

func (s *Sentry) Activate()

func (*Sentry) Checkin

func (s *Sentry) Checkin(format string, args ...interface{})

func (*Sentry) Counter

func (s *Sentry) Counter() int64

func (*Sentry) Deactivate

func (s *Sentry) Deactivate()

func (*Sentry) Identifier

func (s *Sentry) Identifier() string

func (*Sentry) Notes

func (s *Sentry) Notes() string

func (*Sentry) SetTTL

func (s *Sentry) SetTTL(duration time.Duration) *Sentry

func (*Sentry) Update

func (s *Sentry) Update(format string, args ...interface{})

type SentryTeam

type SentryTeam struct {
	Name          string
	Sentries      map[string]*Sentry
	DefaultTtl    time.Duration
	CheckInterval time.Duration
	Active        bool

	TripwireFunc func(*Sentry)
	// contains filtered or unexported fields
}

func NewSentryTeam

func NewSentryTeam() *SentryTeam

func (*SentryTeam) ActiveStatus

func (st *SentryTeam) ActiveStatus()

func (*SentryTeam) CheckEnsure

func (st *SentryTeam) CheckEnsure(name string, format string, opt ...interface{}) *Sentry

func (*SentryTeam) Ensure

func (st *SentryTeam) Ensure(name string) *Sentry

func (*SentryTeam) Identifier

func (st *SentryTeam) Identifier() string

func (*SentryTeam) NewSentry

func (st *SentryTeam) NewSentry(Name string, opts ...interface{}) *Sentry

Jump to

Keyboard shortcuts

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