statusHandler

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHandlersSliceIsNil = errors.New("no AppStatusHandler provided")

ErrHandlersSliceIsNil will be returned when trying to create an AppStatusFacade with no handler

View Source
var ErrNilHandlerInSlice = errors.New("nil AppStatusHandler")

ErrNilHandlerInSlice will be returned when one of the handlers passed to the Facade is nil

Functions

This section is empty.

Types

type AppStatusFacade

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

AppStatusFacade will be used for handling multiple monitoring tools at once

func NewAppStatusFacadeWithHandlers

func NewAppStatusFacadeWithHandlers(aphs ...core.AppStatusHandler) (*AppStatusFacade, error)

NewAppStatusFacadeWithHandlers will receive the handlers which should receive monitored data

func (*AppStatusFacade) Close

func (asf *AppStatusFacade) Close()

Close method will close all the handlers

func (*AppStatusFacade) Decrement

func (asf *AppStatusFacade) Decrement(key string)

Decrement method - will decrement the value for a key for every handler

func (*AppStatusFacade) Increment

func (asf *AppStatusFacade) Increment(key string)

Increment method - will increment the value for a key for every handler

func (*AppStatusFacade) IsInterfaceNil

func (asf *AppStatusFacade) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*AppStatusFacade) SetInt64Value

func (asf *AppStatusFacade) SetInt64Value(key string, value int64)

SetInt64Value method - will update the value for a key for every handler

func (*AppStatusFacade) SetStringValue

func (asf *AppStatusFacade) SetStringValue(key string, value string)

SetStringValue method - will update the value for a key for every handler

func (*AppStatusFacade) SetUInt64Value

func (asf *AppStatusFacade) SetUInt64Value(key string, value uint64)

SetUInt64Value method - will update the value for a key for every handler

type NilStatusHandler

type NilStatusHandler struct {
}

NilStatusHandler will be used when an AppStatusHandler is required, but another one isn't necessary or available

func NewNilStatusHandler

func NewNilStatusHandler() *NilStatusHandler

NewNilStatusHandler will return an instance of the struct

func (*NilStatusHandler) Close

func (nsh *NilStatusHandler) Close()

Close method - won't do anything

func (*NilStatusHandler) Decrement

func (nsh *NilStatusHandler) Decrement(key string)

Decrement method - won't do anything

func (*NilStatusHandler) Increment

func (nsh *NilStatusHandler) Increment(key string)

Increment method - won't do anything

func (*NilStatusHandler) IsInterfaceNil

func (nsh *NilStatusHandler) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*NilStatusHandler) SetInt64Value

func (nsh *NilStatusHandler) SetInt64Value(key string, value int64)

SetInt64Value method - won't do anything

func (*NilStatusHandler) SetStringValue

func (nsh *NilStatusHandler) SetStringValue(key string, value string)

SetStringValue method - won't do anything

func (*NilStatusHandler) SetUInt64Value

func (nsh *NilStatusHandler) SetUInt64Value(key string, value uint64)

SetUInt64Value method - won't do anything

type PrometheusStatusHandler added in v1.0.12

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

PrometheusStatusHandler will define the handler which will update prometheus metrics

func NewPrometheusStatusHandler added in v1.0.12

func NewPrometheusStatusHandler() *PrometheusStatusHandler

NewPrometheusStatusHandler will return an instance of a PrometheusStatusHandler

func (*PrometheusStatusHandler) Close added in v1.0.12

func (psh *PrometheusStatusHandler) Close()

Close will unregister Prometheus metrics

func (*PrometheusStatusHandler) Decrement added in v1.0.12

func (psh *PrometheusStatusHandler) Decrement(key string)

Decrement will be used for decrementing the value for a key

func (*PrometheusStatusHandler) Increment added in v1.0.12

func (psh *PrometheusStatusHandler) Increment(key string)

Increment will be used for incrementing the value for a key

func (*PrometheusStatusHandler) InitMetrics added in v1.0.12

func (psh *PrometheusStatusHandler) InitMetrics()

InitMetrics will declare and init all the metrics which should be used for Prometheus

func (*PrometheusStatusHandler) InitMetricsMap added in v1.0.12

func (psh *PrometheusStatusHandler) InitMetricsMap()

InitMetricsMap will init the map of prometheus metrics

func (*PrometheusStatusHandler) IsInterfaceNil added in v1.0.12

func (psh *PrometheusStatusHandler) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*PrometheusStatusHandler) SetInt64Value added in v1.0.12

func (psh *PrometheusStatusHandler) SetInt64Value(key string, value int64)

SetInt64Value method - will update the value for a key

func (*PrometheusStatusHandler) SetStringValue added in v1.0.12

func (psh *PrometheusStatusHandler) SetStringValue(key string, value string)

SetStringValue method - will update the value for a key

func (*PrometheusStatusHandler) SetUInt64Value added in v1.0.12

func (psh *PrometheusStatusHandler) SetUInt64Value(key string, value uint64)

SetUInt64Value method - will update the value for a key

type TermuiStatusHandler added in v1.0.12

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

TermuiStatusHandler will be used when an AppStatusHandler is required, but another one isn't necessary or available

func NewTermuiStatusHandler added in v1.0.12

func NewTermuiStatusHandler() *TermuiStatusHandler

NewTermuiStatusHandler will return an instance of the struct

func (*TermuiStatusHandler) Close added in v1.0.12

func (tsh *TermuiStatusHandler) Close()

Close method - won't do anything

func (*TermuiStatusHandler) Decrement added in v1.0.12

func (tsh *TermuiStatusHandler) Decrement(key string)

Decrement - will decrement the value of a key

func (*TermuiStatusHandler) Increment added in v1.0.12

func (tsh *TermuiStatusHandler) Increment(key string)

Increment - will increment the value of a key

func (*TermuiStatusHandler) IsInterfaceNil added in v1.0.12

func (tsh *TermuiStatusHandler) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*TermuiStatusHandler) SetInt64Value added in v1.0.12

func (tsh *TermuiStatusHandler) SetInt64Value(key string, value int64)

SetInt64Value method - will update the value for a key

func (*TermuiStatusHandler) SetStringValue added in v1.0.12

func (tsh *TermuiStatusHandler) SetStringValue(key string, value string)

SetStringValue method - will update the value of a key

func (*TermuiStatusHandler) SetUInt64Value added in v1.0.12

func (tsh *TermuiStatusHandler) SetUInt64Value(key string, value uint64)

SetUInt64Value method - will update the value for a key

func (*TermuiStatusHandler) StartTermuiConsole added in v1.0.12

func (tsh *TermuiStatusHandler) StartTermuiConsole() error

StartTermuiConsole method will start termui console

func (*TermuiStatusHandler) Termui added in v1.0.12

func (tsh *TermuiStatusHandler) Termui() *termuic.TermuiConsole

Termui method - returns address of TermuiConsole structure from TermuiStatusHandler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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