Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Close()
- func (c *Connection) IterateRelations(cb func(*gosmparse.Relation, error))
- func (c *Connection) Open(path string)
- func (c *Connection) ReadCoord(id int64) (*gosmparse.Node, error)
- func (c *Connection) ReadNode(id int64) (*gosmparse.Node, error)
- func (c *Connection) ReadRelation(id int64) (*gosmparse.Relation, error)
- func (c *Connection) ReadWay(id int64) (*gosmparse.Way, error)
- func (c *Connection) WriteCoord(item gosmparse.Node) error
- func (c *Connection) WriteNode(item gosmparse.Node) error
- func (c *Connection) WriteRelation(item gosmparse.Relation) error
- func (c *Connection) WriteWay(item gosmparse.Way) error
- type CoordWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection - Connection
func (*Connection) IterateRelations ¶
func (c *Connection) IterateRelations(cb func(*gosmparse.Relation, error))
IterateRelations - read all relations from db and decode one-by-one
func (*Connection) ReadCoord ¶
func (c *Connection) ReadCoord(id int64) (*gosmparse.Node, error)
ReadCoord - read lat/lon pair from db and decode
func (*Connection) ReadNode ¶
func (c *Connection) ReadNode(id int64) (*gosmparse.Node, error)
ReadNode - read node from db and decode
func (*Connection) ReadRelation ¶
func (c *Connection) ReadRelation(id int64) (*gosmparse.Relation, error)
ReadRelation - read relation from db and decode
func (*Connection) ReadWay ¶
func (c *Connection) ReadWay(id int64) (*gosmparse.Way, error)
ReadWay - read way from db and decode
func (*Connection) WriteCoord ¶
func (c *Connection) WriteCoord(item gosmparse.Node) error
WriteCoord - encode and write lat/lon pair to db
func (*Connection) WriteNode ¶
func (c *Connection) WriteNode(item gosmparse.Node) error
WriteNode - encode and write node to db
func (*Connection) WriteRelation ¶
func (c *Connection) WriteRelation(item gosmparse.Relation) error
WriteRelation - encode and write relation to db
type CoordWriter ¶
type CoordWriter struct { Conn *Connection WaitGroup *sync.WaitGroup Queue chan kv }
CoordWriter - buffered stdout writer with sync channel
func NewCoordWriter ¶
func NewCoordWriter(conn *Connection) *CoordWriter
NewCoordWriter - constructor
func (*CoordWriter) Close ¶
func (w *CoordWriter) Close()
Close - close the channel and block until done
func (*CoordWriter) Enqueue ¶
func (w *CoordWriter) Enqueue(item *gosmparse.Node)
Enqueue - close the channel and block until done
Click to show internal directories.
Click to hide internal directories.