Documentation ¶
Index ¶
- type Config
- type Option
- func OptGNPort(i int) Option
- func OptJobsNum(i int) Option
- func OptMatcherURL(s string) Option
- func OptMaxEditDist(i int) Option
- func OptPgDB(s string) Option
- func OptPgHost(s string) Option
- func OptPgPass(s string) Option
- func OptPgPort(i int) Option
- func OptPgUser(s string) Option
- func OptWebLogsNsqdTCP(s string) Option
- func OptWithWebLogs(b bool) Option
- func OptWorkDir(s string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Port is the REST service port Port int // CacheDir is a directory to keep cached data. CacheDir string // JobsNum is the number of processes to run concurrently. JobsNum int // MaxEditDist is the the muximum number of Levenschein edits before // aborging a fuzzy matching. MaxEditDist int // MatcherURL is the URL where GNmatcher REST service resides. // It is used to get source-agnostic name-matching. MatcherURL string // PgDB is the name of GNames database. PgDB string // PgHost is the domain name or IP address of PostgreSQL service. PgHost string // PgPass is the password for the PostgreSQL user. PgPass string // PgPort is the port used by PostgreSQL service. PgPort int // PgUser is the PostgreSQL user with access to GNames database. PgUser string // WebLogsNsqdTCP provides an address to the NSQ messenger TCP service. If // this value is set and valid, the web logs will be published to the NSQ. // The option is ignored if `Port` is not set. // // If WithWebLogs option is set to `false`, but `WebLogsNsqdTCP` is set to a // valid URL, the logs will be sent to the NSQ messanging service, but they // wil not appear as STRERR output. // Example: `127.0.0.1:4150` WebLogsNsqdTCP string // WithWebLogs flag enables logs when running web-service. This flag is // ignored if `Port` value is not set. WithWebLogs bool }
Config collects and stores external configuration data.
func (Config) FiltersDir ¶
FiltersDir returns path where to dump/restore serialized bloom filters.
type Option ¶
type Option func(cnf *Config)
Option is a type of all options for Config.
func OptJobsNum ¶
OptJobsNum sets number of concurrent jobs to run for parallel tasks.
func OptMatcherURL ¶
OptMatcherURL sets the name of gnames database
func OptMaxEditDist ¶
OptMaxEditDist sets maximal possible edit distance for fuzzy matching of stemmed canonical forms.
func OptWebLogsNsqdTCP ¶ added in v0.6.0
OptWebLogsNsqdTCP provides a URL to NSQ messanging service.
func OptWithWebLogs ¶ added in v0.6.0
OptWithWebLogs sets the WithWebLogs field.
func OptWorkDir ¶
OptWorkDir sets a directory for key-value stores and temporary files.
Click to show internal directories.
Click to hide internal directories.