Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SampleService ¶
type SampleService struct {
// contains filtered or unexported fields
}
SampleService is responsible for interacting with Mongo DB.
func NewSampleService ¶
func NewSampleService(url string) (*SampleService, error)
NewSampleService connects do Mongo and returns a service instance.
func (*SampleService) Query ¶
func (s *SampleService) Query(start, end time.Time) ([]rpimonitor.Sample, error)
Query returns a collections of samples stored in the specified time interval.
func (*SampleService) Write ¶
func (s *SampleService) Write(sample *rpimonitor.Sample) error
Write stores a sample metrics in the database.
Click to show internal directories.
Click to hide internal directories.