mapdb

package
v0.0.0-...-d12bbc4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoRevisionsFound

type NoRevisionsFound = error

NoRevisionsFound is returned when the DB appears valid but has no revisions in it.

type TileDB

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

TileDB provides read/write access to the generated Map tiles.

func NewTileDB

func NewTileDB(location string) (*TileDB, error)

NewTileDB creates a TileDB using a file at the given location. If the file doesn't exist it will be created.

func (*TileDB) Init

func (d *TileDB) Init() error

Init creates the database tables if needed.

func (*TileDB) LatestRevision

func (d *TileDB) LatestRevision() (rev int, logroot []byte, count int64, err error)

LatestRevision gets the metadata for the last completed write.

func (*TileDB) NextWriteRevision

func (d *TileDB) NextWriteRevision() (int, error)

NextWriteRevision gets the revision that the next generation of the map should be written at.

func (*TileDB) Tile

func (d *TileDB) Tile(revision int, path []byte) (*batchmap.Tile, error)

Tile gets the tile at the given path in the given revision of the map.

func (*TileDB) Versions

func (d *TileDB) Versions(revision int, module string) ([]string, error)

Versions gets the log of versions for the given module in the given map revision.

func (*TileDB) WriteRevision

func (d *TileDB) WriteRevision(rev int, logCheckpoint []byte, count int64) error

WriteRevision writes the metadata for a completed run into the database. If this method isn't called then the tiles may be written but this revision will be skipped by sensible readers because the provenance information isn't available.

Jump to

Keyboard shortcuts

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