[yaala] input types.

qmax yaala@verplant.org
Tue, 17 Dec 2002 15:45:44 +0600

ipchains accounting tool ipac stores data in separate files instead of
single log.
ipac-ng can store data in db.

I guess there realy should be different types of input sources,
in particular:
'file' - single file, like normal logs,
'directory' - to allow parser module search for needed files,
'db' - to get data from db.

Sources can be identified by Universal Resource Identifiers :)
that is, in forms
file://path for both logfile and directory sources,
databasetype://user:pass@host/table for db source.

I guess it would be Right Thing to handle all sources generally in
separate input-module with interface like:
 open($URL,$params) -> $handler
 fetch($handler) -> $raw_record

The $raw_record is single line for logfile source, filename (or
filehandle ?) for directory source and in case of db it is
reference to hash of fetched data.

Hm... looks nice :)
ergh ?