Documentation ¶
Index ¶
- Variables
- func NewStatusMetrics() *statusMetrics
- type AppStatusFacade
- func (asf *AppStatusFacade) AddUint64(key string, value uint64)
- func (asf *AppStatusFacade) Close()
- func (asf *AppStatusFacade) Decrement(key string)
- func (asf *AppStatusFacade) Increment(key string)
- func (asf *AppStatusFacade) IsInterfaceNil() bool
- func (asf *AppStatusFacade) SetInt64Value(key string, value int64)
- func (asf *AppStatusFacade) SetStringValue(key string, value string)
- func (asf *AppStatusFacade) SetUInt64Value(key string, value uint64)
- type NilStatusHandler
- func (nsh *NilStatusHandler) AddUint64(_ string, _ uint64)
- func (nsh *NilStatusHandler) Close()
- func (nsh *NilStatusHandler) Decrement(_ string)
- func (nsh *NilStatusHandler) Increment(_ string)
- func (nsh *NilStatusHandler) IsInterfaceNil() bool
- func (nsh *NilStatusHandler) SetInt64Value(_ string, _ int64)
- func (nsh *NilStatusHandler) SetStringValue(_ string, _ string)
- func (nsh *NilStatusHandler) SetUInt64Value(_ string, _ uint64)
Constants ¶
This section is empty.
Variables ¶
var ErrHandlersSliceIsNil = errors.New("no AppStatusHandler provided")
ErrHandlersSliceIsNil will be returned when trying to create an AppStatusFacade with no handler
var ErrInvalidRefreshTimeInMilliseconds = errors.New("invalid refresh time in milliseconds")
ErrInvalidRefreshTimeInMilliseconds signals that an invalid time in milliseconds was provided
var ErrNilAppStatusHandler = errors.New("appStatusHandler is nil")
ErrNilAppStatusHandler signals that a nil status handler has been provided
var ErrNilGrid = errors.New("nil grid")
ErrNilGrid will be returned when a nil grid is returned
var ErrNilHandlerInSlice = errors.New("nil AppStatusHandler")
ErrNilHandlerInSlice will be returned when one of the handlers passed to the Facade is nil
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilPresenterInterface = errors.New("nil presenter interface")
ErrNilPresenterInterface will be returned when a nil PresenterInterface is passed as parameter
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that a nil storage has been provided
var ErrNilTermUIStartChannel = errors.New("nil TermUI start channel")
ErrNilTermUIStartChannel signals that a nil TermUI start channel has been provided
var ErrNilUint64Converter = errors.New("unit64converter is nil")
ErrNilUint64Converter signals that uint64converter is nil
Functions ¶
func NewStatusMetrics ¶
func NewStatusMetrics() *statusMetrics
NewStatusMetrics will return an instance of the struct
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) AddUint64 ¶
func (asf *AppStatusFacade) AddUint64(key string, value uint64)
AddUint64 method - will increase the value for a key for every handler
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 returns true 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) AddUint64 ¶
func (nsh *NilStatusHandler) AddUint64(_ string, _ uint64)
AddUint64 method - won't do anything
func (*NilStatusHandler) Close ¶
func (nsh *NilStatusHandler) Close()
Close method - won't do anything
func (*NilStatusHandler) Decrement ¶
func (nsh *NilStatusHandler) Decrement(_ string)
Decrement method - won't do anything
func (*NilStatusHandler) Increment ¶
func (nsh *NilStatusHandler) Increment(_ string)
Increment method - won't do anything
func (*NilStatusHandler) IsInterfaceNil ¶
func (nsh *NilStatusHandler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NilStatusHandler) SetInt64Value ¶
func (nsh *NilStatusHandler) SetInt64Value(_ string, _ int64)
SetInt64Value method - won't do anything
func (*NilStatusHandler) SetStringValue ¶
func (nsh *NilStatusHandler) SetStringValue(_ string, _ string)
SetStringValue method - won't do anything
func (*NilStatusHandler) SetUInt64Value ¶
func (nsh *NilStatusHandler) SetUInt64Value(_ string, _ uint64)
SetUInt64Value method - won't do anything