metrics

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 10 Imported by: 0

README

metrics

Montelibero Association metrics service

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapDebug

func WrapDebug(name string, fn cron.FuncJob) cron.FuncJob

Types

type Accounter

type Accounter interface {
	Accounts(request horizonclient.AccountsRequest) (accounts horizon.AccountsPage, err error)
	NextAccountsPage(page horizon.AccountsPage) (accounts horizon.AccountsPage, err error)
}

type CronLogger

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

func NewCronLogger

func NewCronLogger(l *slog.Logger) *CronLogger

func (*CronLogger) Error

func (c *CronLogger) Error(err error, msg string, keysAndValues ...interface{})

func (*CronLogger) Info

func (c *CronLogger) Info(msg string, keysAndValues ...interface{})

type Logger

type Logger interface {
	Debug(msg string, args ...interface{})
	Info(msg string, args ...interface{})
	Error(msg string, args ...interface{})
}

type MTLAPGauge

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

func NewMTLAPGauge

func NewMTLAPGauge(l Logger, cl Accounter, m Metricer) *MTLAPGauge

func (*MTLAPGauge) Update

func (g *MTLAPGauge) Update()

type MTLAPGaugeParams

type MTLAPGaugeParams struct {
	MTLAPCount           string
	IsCouncilReady       bool
	IsCouncilDelegation  bool
	IsAssemblyDelegation bool
	IsFundDelegation     bool
	IsBSNBasicFilled     bool
	IsBSNPartialyFilled  bool
}

type Metricer

type Metricer interface {
	MTLAPGaugeReset()
	MTLAPGaugeInc(p MTLAPGaugeParams)
}

type Metrics

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

func NewMetrics

func NewMetrics(l Logger) *Metrics

func (*Metrics) MTLAPGaugeInc

func (m *Metrics) MTLAPGaugeInc(p MTLAPGaugeParams)

func (*Metrics) MTLAPGaugeReset

func (m *Metrics) MTLAPGaugeReset()

type MockAccounter

type MockAccounter struct {
	mock.Mock
}

MockAccounter is an autogenerated mock type for the Accounter type

func NewMockAccounter

func NewMockAccounter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAccounter

NewMockAccounter creates a new instance of MockAccounter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAccounter) Accounts

Accounts provides a mock function with given fields: request

func (*MockAccounter) EXPECT

func (_m *MockAccounter) EXPECT() *MockAccounter_Expecter

func (*MockAccounter) NextAccountsPage

func (_m *MockAccounter) NextAccountsPage(page horizon.AccountsPage) (horizon.AccountsPage, error)

NextAccountsPage provides a mock function with given fields: page

type MockAccounter_Accounts_Call

type MockAccounter_Accounts_Call struct {
	*mock.Call
}

MockAccounter_Accounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Accounts'

func (*MockAccounter_Accounts_Call) Return

func (*MockAccounter_Accounts_Call) Run

func (*MockAccounter_Accounts_Call) RunAndReturn

type MockAccounter_Expecter

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

func (*MockAccounter_Expecter) Accounts

func (_e *MockAccounter_Expecter) Accounts(request interface{}) *MockAccounter_Accounts_Call

Accounts is a helper method to define mock.On call

  • request horizonclient.AccountsRequest

func (*MockAccounter_Expecter) NextAccountsPage

func (_e *MockAccounter_Expecter) NextAccountsPage(page interface{}) *MockAccounter_NextAccountsPage_Call

NextAccountsPage is a helper method to define mock.On call

  • page horizon.AccountsPage

type MockAccounter_NextAccountsPage_Call

type MockAccounter_NextAccountsPage_Call struct {
	*mock.Call
}

MockAccounter_NextAccountsPage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextAccountsPage'

func (*MockAccounter_NextAccountsPage_Call) Return

func (*MockAccounter_NextAccountsPage_Call) Run

func (*MockAccounter_NextAccountsPage_Call) RunAndReturn

type MockLogger

type MockLogger struct {
	mock.Mock
}

MockLogger is an autogenerated mock type for the Logger type

func NewMockLogger

func NewMockLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLogger

NewMockLogger creates a new instance of MockLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockLogger) Debug

func (_m *MockLogger) Debug(msg string, args ...interface{})

Debug provides a mock function with given fields: msg, args

func (*MockLogger) EXPECT

func (_m *MockLogger) EXPECT() *MockLogger_Expecter

func (*MockLogger) Error

func (_m *MockLogger) Error(msg string, args ...interface{})

Error provides a mock function with given fields: msg, args

func (*MockLogger) Info

func (_m *MockLogger) Info(msg string, args ...interface{})

Info provides a mock function with given fields: msg, args

type MockLogger_Debug_Call

type MockLogger_Debug_Call struct {
	*mock.Call
}

MockLogger_Debug_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Debug'

func (*MockLogger_Debug_Call) Return

func (*MockLogger_Debug_Call) Run

func (_c *MockLogger_Debug_Call) Run(run func(msg string, args ...interface{})) *MockLogger_Debug_Call

func (*MockLogger_Debug_Call) RunAndReturn

func (_c *MockLogger_Debug_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Debug_Call

type MockLogger_Error_Call

type MockLogger_Error_Call struct {
	*mock.Call
}

MockLogger_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error'

func (*MockLogger_Error_Call) Return

func (*MockLogger_Error_Call) Run

func (_c *MockLogger_Error_Call) Run(run func(msg string, args ...interface{})) *MockLogger_Error_Call

func (*MockLogger_Error_Call) RunAndReturn

func (_c *MockLogger_Error_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Error_Call

type MockLogger_Expecter

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

func (*MockLogger_Expecter) Debug

func (_e *MockLogger_Expecter) Debug(msg interface{}, args ...interface{}) *MockLogger_Debug_Call

Debug is a helper method to define mock.On call

  • msg string
  • args ...interface{}

func (*MockLogger_Expecter) Error

func (_e *MockLogger_Expecter) Error(msg interface{}, args ...interface{}) *MockLogger_Error_Call

Error is a helper method to define mock.On call

  • msg string
  • args ...interface{}

func (*MockLogger_Expecter) Info

func (_e *MockLogger_Expecter) Info(msg interface{}, args ...interface{}) *MockLogger_Info_Call

Info is a helper method to define mock.On call

  • msg string
  • args ...interface{}

type MockLogger_Info_Call

type MockLogger_Info_Call struct {
	*mock.Call
}

MockLogger_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'

func (*MockLogger_Info_Call) Return

func (*MockLogger_Info_Call) Run

func (_c *MockLogger_Info_Call) Run(run func(msg string, args ...interface{})) *MockLogger_Info_Call

func (*MockLogger_Info_Call) RunAndReturn

func (_c *MockLogger_Info_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Info_Call

type MockMetricer

type MockMetricer struct {
	mock.Mock
}

MockMetricer is an autogenerated mock type for the Metricer type

func NewMockMetricer

func NewMockMetricer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMetricer

NewMockMetricer creates a new instance of MockMetricer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMetricer) EXPECT

func (_m *MockMetricer) EXPECT() *MockMetricer_Expecter

func (*MockMetricer) MTLAPGaugeInc

func (_m *MockMetricer) MTLAPGaugeInc(p MTLAPGaugeParams)

MTLAPGaugeInc provides a mock function with given fields: p

func (*MockMetricer) MTLAPGaugeReset

func (_m *MockMetricer) MTLAPGaugeReset()

MTLAPGaugeReset provides a mock function with given fields:

type MockMetricer_Expecter

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

func (*MockMetricer_Expecter) MTLAPGaugeInc

func (_e *MockMetricer_Expecter) MTLAPGaugeInc(p interface{}) *MockMetricer_MTLAPGaugeInc_Call

MTLAPGaugeInc is a helper method to define mock.On call

  • p MTLAPGaugeParams

func (*MockMetricer_Expecter) MTLAPGaugeReset

MTLAPGaugeReset is a helper method to define mock.On call

type MockMetricer_MTLAPGaugeInc_Call

type MockMetricer_MTLAPGaugeInc_Call struct {
	*mock.Call
}

MockMetricer_MTLAPGaugeInc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MTLAPGaugeInc'

func (*MockMetricer_MTLAPGaugeInc_Call) Return

func (*MockMetricer_MTLAPGaugeInc_Call) Run

func (*MockMetricer_MTLAPGaugeInc_Call) RunAndReturn

type MockMetricer_MTLAPGaugeReset_Call

type MockMetricer_MTLAPGaugeReset_Call struct {
	*mock.Call
}

MockMetricer_MTLAPGaugeReset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MTLAPGaugeReset'

func (*MockMetricer_MTLAPGaugeReset_Call) Return

func (*MockMetricer_MTLAPGaugeReset_Call) Run

func (*MockMetricer_MTLAPGaugeReset_Call) RunAndReturn

Directories

Path Synopsis
cmd
metrics command

Jump to

Keyboard shortcuts

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