Documentation
¶
Overview ¶
Package pcat supports reading files produced by the pcat utility which is a part of the NLnet Labs' ldns project.
See also: http://www.nlnetlabs.nl/svn/ldns/trunk/pcat/README.pcat
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Scan ¶
Scan scans a pcat formatted text file from src, assuming file name is 'name'. Handler 'handler' is called for every Record found in src. If handler returns false the scanning process is aborted and Scan returns err == nil. If there is any error detected while scanning then the scanning is aborted as well and the error is returned.
Types ¶
type DB ¶
DB represents a pcat data store. It is intended for temporary DBs of e.g. some analytical tools. It has a rather big size overhead (~16M).
func NewDB ¶
NewDB creates the DB in named file fn, truncating it if it already exists. If successful, methods on the returned DB can be used for I/O. It returns the DB and an error, if any.
func OpenDB ¶
OpenDB opens a DB in/from named file fn. If successful, methods on the returned DB can be used for data exchange. OpenDB returns the DB and an error, if any.
func (*DB) Close ¶
Close closes the DB. Further access to the DB has undefined behavior and may panic. It returns an error, if any.