application

package
v5.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthDto

type HealthDto struct {
	Healthy      bool       `json:"healthy"`
	HealthySince *time.Time `json:"healthySince"`
	Items        []ItemDto  `json:"items"`
}

HealthDto struct

type ItemDto

type ItemDto struct {
	Name       string     `json:"name"`
	Healthy    bool       `json:"healthy"`
	LastHit    *time.Time `json:"lastHit,omitempty"`
	ErrorCount int        `json:"errorCount,omitempty"`
	Severity   int        `json:"-"`
}

ItemDto struct

type MonitorImp

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

MonitorImp description

func NewMonitorImp

func NewMonitorImp(
	splitsConfig counter.ThresholdConfig,
	segmentsConfig counter.ThresholdConfig,
	storageConfig *counter.PeriodicConfig,
	logger logging.LoggerInterface,
) *MonitorImp

NewMonitorImp create a new application monitor

func (*MonitorImp) GetHealthStatus

func (m *MonitorImp) GetHealthStatus() HealthDto

GetHealthStatus get application health

func (*MonitorImp) NotifyEvent

func (m *MonitorImp) NotifyEvent(counterType int)

NotifyEvent notify to counter an event

func (*MonitorImp) Reset

func (m *MonitorImp) Reset(counterType int, value int)

Reset counter value

func (*MonitorImp) Start

func (m *MonitorImp) Start()

Start counters

func (*MonitorImp) Stop

func (m *MonitorImp) Stop()

Stop counters

type MonitorIterface

type MonitorIterface interface {
	GetHealthStatus() HealthDto
	NotifyEvent(counterType int)
	Reset(counterType int, value int)
	Start()
	Stop()
}

MonitorIterface monitor interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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