mongo

package
v0.0.0-...-ffb5472 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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