cache

package
v0.0.0-...-63ab681 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coords

type Coords struct {
	*leveldb.DB
}

The coord cache is a cache of every nodes' coordinates.

func NewCoordsCache

func NewCoordsCache(path string, options *opt.Options) (*Coords, error)

func (*Coords) FillWay

func (c *Coords) FillWay(way *structures.Way) error

func (*Coords) PutCoord

func (c *Coords) PutCoord(node structures.Node) error

type Nodes

type Nodes struct {
	*leveldb.DB
}

func NewNodesCache

func NewNodesCache(path string, options *opt.Options) (*Nodes, error)

func (*Nodes) Iterate

func (n *Nodes) Iterate() chan *structures.Node

func (*Nodes) PutNode

func (n *Nodes) PutNode(node structures.Node) error

type OSM

type OSM struct {
	Nodes     *Nodes
	Coords    *Coords
	Ways      *Ways
	Relations *Relations
	// contains filtered or unexported fields
}

func NewOSMCache

func NewOSMCache(dir string) *OSM

func (*OSM) Close

func (c *OSM) Close()

func (*OSM) Open

func (c *OSM) Open() error

type Relations

type Relations struct {
	*leveldb.DB
}

func NewRelationsCache

func NewRelationsCache(path string) (*Relations, error)

func (*Relations) Iterate

func (r *Relations) Iterate() chan *structures.Relation

func (*Relations) PutRelation

func (r *Relations) PutRelation(relation structures.Relation) error

type Ways

type Ways struct {
	*leveldb.DB
}

func NewWaysCache

func NewWaysCache(path string, options *opt.Options) (*Ways, error)

func (*Ways) GetWay

func (w *Ways) GetWay(wayId int64) (*structures.Way, error)

func (*Ways) Iterate

func (w *Ways) Iterate() chan *structures.Way

func (*Ways) PutWay

func (w *Ways) PutWay(way structures.Way) error

Directories

Path Synopsis
Package binary is a generated protocol buffer package.
Package binary is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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