Documentation
¶
Overview ¶
package config contains information needed to run gnmatcher project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // WorkDir is the main directory for gnmatcher files. It contains // bloom filters levenshtein automata trees, key-value stores etc. WorkDir string // MaxEditDist is the maximal allowed edit distance for levenshtein automata. // The number cannot exceed 2, default number is 1. The speed of execution // slows down dramatically with the MaxEditDist > 1. MaxEditDist int // JobsNum is the number of jobs to run in parallel JobsNum int // PgHost is a hostname for the PostgreSQL server. PgHost string // PgPort is the port of PostgreSQL server. PgPort int // PgUser is the user for the database. PgUser string // PgPass password to access PostgreSQL server. PgPass string // PgDB the database name where gnames data is located. PgDB string }
Config collects and stores external configuration data.
func NewConfig ¶
NewConfig is a Config constructor that takes external options to update default values to external ones.
func (Config) FiltersDir ¶
FiltersDir returns path where to dump/restore serialized bloom filters.
type Option ¶
type Option func(cfg *Config)
Option is a type of all options for Config.
func OptJobsNum ¶
OptJobsNum sets the number of jobs to run in parallel
func OptMaxEditDist ¶
OptMaxEditDist sets maximal possible edit distance for fuzzy matching of stemmed canonical forms.
func OptWorkDir ¶
OptWorkDir sets a directory for key-value stores and temporary files.
Click to show internal directories.
Click to hide internal directories.