Documentation ¶
Index ¶
- func False(_ record.Record) bool
- func GenKey(metric string, t time.Time) string
- func GetAllRecords(q Query) []record.Record
- func True(_ record.Record) bool
- type File
- func (f *File) Append(rec record.Record) error
- func (f *File) AppendBulk(rec record.Record) error
- func (f *File) Close() error
- func (f *File) EntryCount() (int, error)
- func (f *File) Expired(t time.Time) bool
- func (f *File) GetLatestRecord() (record.Record, error)
- func (f *File) GetRecord(i int) (record.Record, error)
- func (f *File) IsOpen() bool
- func (f *File) Size() (int, error)
- func (f *File) Sync() error
- type Filter
- type Query
- type QueryBuilder
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenKey ¶
GenKey returns the file name for a metric at a specific time.Time Note the file name returned will be that in UTC not the timezone for the passed time
func GetAllRecords ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) EntryCount ¶
EntryCount returns the number of metrics in the file
type QueryBuilder ¶
type QueryBuilder interface { // Today sets the search range to span from Local Midnight for 24 hours Today() QueryBuilder // TodayUTC sets the search range to span from Midnight UTC for 24 hours TodayUTC() QueryBuilder // Yesterday sets the search range to span yesterday in local time Yesterday() QueryBuilder // YesterdayUTC sets the search range to span yesterday in UTC YesterdayUTC() QueryBuilder // DayFrom sets the search range to span for 24 hours from the specified time DayFrom(from time.Time) QueryBuilder // DayTo sets the search range to span for 24 hours up until the specified time DayTo(to time.Time) QueryBuilder // Between sets the time range of the query Between(from, to time.Time) QueryBuilder // Filter sets the filter to use. If one already exists then this will be or'ed with it. Filter(Filter) QueryBuilder // Build the final Query Build() Query }
type Store ¶
type Store interface { // Append a record to a metric Append(metric string, rec record.Record) error AppendBulk(metric string, rec record.Record) error Sync(metric string) error // GetRecord returns the numbered record for a metric on a specific date GetRecord(metric string, date time.Time, num int) (record.Record, error) // NumRecords returns the number of metrics for a metric on a specific date NumRecords(metric string, date time.Time) (int, error) // Query returns a builder to build a query against a metric Query(metric string) QueryBuilder }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.