Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeReadWriter ¶
type FakeReadWriter struct { ReadWriter FakeFetch func(name string, start, end time.Time) (model.SeriesSlice, error) FakeInsertMetric func(*model.Metric) error }
FakeReadWriter is for stub testing
func (*FakeReadWriter) Fetch ¶
func (s *FakeReadWriter) Fetch(name string, start, end time.Time) (model.SeriesSlice, error)
func (*FakeReadWriter) InsertMetric ¶
func (r *FakeReadWriter) InsertMetric(m *model.Metric) error
type ReadWriter ¶
type ReadWriter interface { Ping() error Init() error Fetch(string, time.Time, time.Time) (model.SeriesSlice, error) InsertMetric(*model.Metric) error }
ReadWriter defines the interface for data store reader and writer.
type Store ¶
type Store struct { Redis redis.ReadWriter DynamoDB dynamodb.ReadWriter }
Store provides each data store client.
func (*Store) InsertMetric ¶
InsertMetric inserts datapoints to Redis with rollup aggregation to DynamoDB if needed.
Click to show internal directories.
Click to hide internal directories.