Documentation
¶
Index ¶
- Constants
- Variables
- type Application
- type CachedMetric
- type MetricSample
- type MockApplication
- type Storage
- func (stg *Storage) Earliest() time.Time
- func (stg *Storage) GetMetric(id int, from, to time.Time, step int, aggregator string) (map[string]any, error)
- func (stg *Storage) GetMetrics(from, to time.Time, step int, page, pageSize int) (map[string]any, error)
- func (stg *Storage) Hostname() string
- func (stg *Storage) Latest() time.Time
- func (stg *Storage) PushMetricSamples(timestamp time.Time, samples []*MetricSample) error
- func (stg *Storage) Shutdown() error
Constants ¶
View Source
const (
SchemaVersion = 1
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Application ¶
type CachedMetric ¶
type CachedMetric struct {
ID int
Name string
Flag string
Format string
Description string
Class string
}
func (*CachedMetric) FormatValue ¶
func (cm *CachedMetric) FormatValue(value any) any
type MetricSample ¶
type MockApplication ¶
MockApplication is an autogenerated mock type for the Application type
func NewMockApplication ¶
func NewMockApplication(t interface {
mock.TestingT
Cleanup(func())
}) *MockApplication
NewMockApplication creates a new instance of MockApplication. 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 (*MockApplication) Cfg ¶
func (_m *MockApplication) Cfg() *config.Config
Cfg provides a mock function with no fields
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(app Application) *Storage
func (*Storage) GetMetrics ¶
func (*Storage) PushMetricSamples ¶
func (stg *Storage) PushMetricSamples(timestamp time.Time, samples []*MetricSample) error
Click to show internal directories.
Click to hide internal directories.