archive

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 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 Records

type Records struct {
	// contains filtered or unexported fields
}

Records stores a handle for the archive database.

func Open

func Open(file string) (r Records, err error)

Open opens up the archive records database.

func (Records) Add

func (r Records) Add(a data.Archive) error

Add adds an archive record to the database.

func (Records) Close

func (r Records) Close() error

Close closes the archive database.

func (Records) Get

func (r Records) Get(begin time.Time, end time.Time) (archive []data.Archive)

Get returns the requested range of archive records as a slice in descending order.

func (Records) Last

func (r Records) Last() (t time.Time)

Last returns the timestamp of the most recent archive record in the database.

func (Records) NewGet

func (r Records) NewGet(begin time.Time, end time.Time) <-chan data.Archive

NewGet creates a channel and sends the requested range of archive records to it in descending order.

Jump to

Keyboard shortcuts

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