From 48bb0befecc96ea5cb86043bfad395c4db18228a Mon Sep 17 00:00:00 2001 From: kayyapil Date: Tue, 8 Dec 2020 17:03:07 +0000 Subject: [PATCH 1/5] Added new folder docs with config-options description on options. --- docs/config-options.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/config-options.md diff --git a/docs/config-options.md b/docs/config-options.md new file mode 100644 index 00000000..f05d15f4 --- /dev/null +++ b/docs/config-options.md @@ -0,0 +1,27 @@ +ConfigOption | Description +:------ | :----- +MaxConcurrentIndexers | defines the total number of indexers required to be used for indexing code. If not provided defaults `2` +HealthCheckURI | health check url for hound , if not provided defaults to `/healthz` +DbPath | absolute file path where the `config.json` file exists. By default is `data` +title | Title used for the application.Defaulted to 'Hound' +url-pattern | composed of base url and anchor values in form of key value pairs. +vs-config | holds the version control config, default VCS used in Hound is git.Other options for VCS are svn,mercurial,bitbucket,hg, etc.Refer to `config-example.json` to get the list of vcs and usage +Repos | holds the list of repos which are required to be indexed by Hound . Each Repo is added with reponame as a Json Key with options associated with repo as values similar to example provided in `config-example.json` + + +gitOptions | Description +:------ | :----- +ms-between-polls | time interval to poll the repo url ,default is `30s` +detect-ref | used to determine branch , defaults to `master` branch +ref | used to provide reference for the branch for repo. + +svn-options | Descriptions +------ | ----- +username | user name for the svn repo +password | password to authenticate use for svn repo. + +url-options | Description +------ | ----- +url-pattern | when provided used by Hound for config, else defaults to `{url}/blob/{rev}/{path}{anchor}` +anchor | when provided used for vcs config else set to `#L{line}` + From 66c5a018c87a64e8c8f830614e5b5865d60073b8 Mon Sep 17 00:00:00 2001 From: ehrktia Date: Thu, 17 Dec 2020 20:43:51 +0000 Subject: [PATCH 2/5] Peer review comment update updated formatting for config options documentation and added link in readme. --- README.md | 3 ++ docs/config-options.md | 74 +++++++++++++++++++++++++++--------------- 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 69a126eb..0bee1b45 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ go get github.com/hound-search/hound/cmds/... 2. Create a config.json file and use it to list your repositories. Check out our [example-config.json](config-example.json) to see how to set up various types of repositories. For example, we can configure Hound to search its own source code using the config found in [default-config.json](default-config.json): + ```json { "dbpath" : "db", @@ -38,6 +39,8 @@ the config found in [default-config.json](default-config.json): } ``` + +complete list of available config options can be found under [config-options](config- 3. Run the Hound server with `houndd` in the same directory as your `config.json`. You should see output similar to: ``` 2015/03/13 09:07:42 Searcher started for statsd diff --git a/docs/config-options.md b/docs/config-options.md index f05d15f4..08f04b23 100644 --- a/docs/config-options.md +++ b/docs/config-options.md @@ -1,27 +1,49 @@ -ConfigOption | Description -:------ | :----- -MaxConcurrentIndexers | defines the total number of indexers required to be used for indexing code. If not provided defaults `2` -HealthCheckURI | health check url for hound , if not provided defaults to `/healthz` -DbPath | absolute file path where the `config.json` file exists. By default is `data` -title | Title used for the application.Defaulted to 'Hound' -url-pattern | composed of base url and anchor values in form of key value pairs. -vs-config | holds the version control config, default VCS used in Hound is git.Other options for VCS are svn,mercurial,bitbucket,hg, etc.Refer to `config-example.json` to get the list of vcs and usage -Repos | holds the list of repos which are required to be indexed by Hound . Each Repo is added with reponame as a Json Key with options associated with repo as values similar to example provided in `config-example.json` - - -gitOptions | Description -:------ | :----- -ms-between-polls | time interval to poll the repo url ,default is `30s` -detect-ref | used to determine branch , defaults to `master` branch -ref | used to provide reference for the branch for repo. - -svn-options | Descriptions ------- | ----- -username | user name for the svn repo -password | password to authenticate use for svn repo. - -url-options | Description ------- | ----- -url-pattern | when provided used by Hound for config, else defaults to `{url}/blob/{rev}/{path}{anchor}` -anchor | when provided used for vcs config else set to `#L{line}` +- [ConfigOptions](#configoptions) + * [Git options](#git-options) + * [SVN options](#svn-options) + * [URL options](#url-options) + + + +### ConfigOptions +Various options available in `config.json` are used by hound.Comprehensive list of available options are provided below with some sane defaults. +keys used in the config json file are the options,description provides details about keys.Default values gives idea about value which can be used for the option. + + +ConfigOption | Description | Default Values +:------ | :----- | :----- +max-concurrent-indexers | defines the total number of indexers required to be used for indexing code | 2 +health-check-uri | health check url for hound | `/healthz` +dbpath | absolute file path where the `config.json` file exists| `data` +title | Title used for the application | Hound +url-pattern | composed of base url and anchor values in form of key value pairs | n/a +vcs-config | holds the version control config, default VCS used in Hound is git.Other options for VCS are svn,mercurial,bitbucket,hg, etc.Refer to `config-example.json` to get the list of vcs and usage. Below tables provide detailed options list of each type of vcs | git +repos | holds the list of repos which are required to be indexed by Hound . Each Repo is added with reponame as a Json Key with options associated with repo as values similar to example provided in `config-example.json` | n/a + +#### Git options +List of options associated with git vcs in repos + +GitOptions | Description | Default Values +:------ | :----- | :----- +ms-between-polls | time interval to poll the repo url | 30s +detect-ref | used to determine branch | master branch +ref | used to provide reference for the branch for repo| n/a + +#### SVN options + +List of options available for SVN vcs in repos + +SvnOptions | Descriptions| Default Values +:------ | :-----| :----- +username | user name for the svn repo | n/a +password | password to authenticate use for svn repo | n/a + + +#### URL options +Options for url used for repo link under repos + +URLOptions | Description | Default Values +:------ | :--- | :----- +url-pattern | when provided used by Hound for config|`{url}/blob/{rev}/{path}{anchor}` +anchor | when provided used for vcs config| `#L{line}` From f2d11a474457e797394a5ec3ca36d604ee0b6fad Mon Sep 17 00:00:00 2001 From: ehrktia Date: Thu, 17 Dec 2020 20:48:38 +0000 Subject: [PATCH 3/5] readme link update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bee1b45..9f1adb6d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ the config found in [default-config.json](default-config.json): ``` -complete list of available config options can be found under [config-options](config- +complete list of available config options can be found under [config-options](config-options.md). 3. Run the Hound server with `houndd` in the same directory as your `config.json`. You should see output similar to: ``` 2015/03/13 09:07:42 Searcher started for statsd From f8881f1c65e68b4b0b23c95c4db39870cd22ae8e Mon Sep 17 00:00:00 2001 From: ehrktia Date: Thu, 17 Dec 2020 20:57:13 +0000 Subject: [PATCH 4/5] link update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f1adb6d..692ae716 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ the config found in [default-config.json](default-config.json): ``` -complete list of available config options can be found under [config-options](config-options.md). +complete list of available config options can be found under [config-options](docs/config-options.md). 3. Run the Hound server with `houndd` in the same directory as your `config.json`. You should see output similar to: ``` 2015/03/13 09:07:42 Searcher started for statsd From f91f82d95e4407967b8a3e262802ee530ff24e77 Mon Sep 17 00:00:00 2001 From: Salem Date: Fri, 22 Jan 2021 13:29:32 -0500 Subject: [PATCH 5/5] Minor edits from code review --- README.md | 2 +- docs/config-options.md | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 692ae716..cb5d6951 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ the config found in [default-config.json](default-config.json): ``` -complete list of available config options can be found under [config-options](docs/config-options.md). +A complete list of available config options can be found [here](docs/config-options.md). 3. Run the Hound server with `houndd` in the same directory as your `config.json`. You should see output similar to: ``` 2015/03/13 09:07:42 Searcher started for statsd diff --git a/docs/config-options.md b/docs/config-options.md index 08f04b23..25d3599a 100644 --- a/docs/config-options.md +++ b/docs/config-options.md @@ -5,8 +5,8 @@ -### ConfigOptions -Various options available in `config.json` are used by hound.Comprehensive list of available options are provided below with some sane defaults. +# Config Options +Most of Hound's behavior is defined by a single `config.json` configuration file. A list of its available options are provided below, along with their defaults. keys used in the config json file are the options,description provides details about keys.Default values gives idea about value which can be used for the option. @@ -20,7 +20,7 @@ url-pattern | composed of base url and anchor values in form of key value pairs vcs-config | holds the version control config, default VCS used in Hound is git.Other options for VCS are svn,mercurial,bitbucket,hg, etc.Refer to `config-example.json` to get the list of vcs and usage. Below tables provide detailed options list of each type of vcs | git repos | holds the list of repos which are required to be indexed by Hound . Each Repo is added with reponame as a Json Key with options associated with repo as values similar to example provided in `config-example.json` | n/a -#### Git options +## Git Options List of options associated with git vcs in repos GitOptions | Description | Default Values @@ -29,7 +29,7 @@ ms-between-polls | time interval to poll the repo url | 30s detect-ref | used to determine branch | master branch ref | used to provide reference for the branch for repo| n/a -#### SVN options +## SVN Options List of options available for SVN vcs in repos @@ -39,11 +39,10 @@ username | user name for the svn repo | n/a password | password to authenticate use for svn repo | n/a -#### URL options +## URL Options Options for url used for repo link under repos URLOptions | Description | Default Values :------ | :--- | :----- url-pattern | when provided used by Hound for config|`{url}/blob/{rev}/{path}{anchor}` anchor | when provided used for vcs config| `#L{line}` -