- Better error handling of goroutines through errCh
- Possible usage of a runner to abstract git operations from the consul package
- Update on KV should be for modified and deleted files only
- Switch from godep to glide
- Switch to apex/log
- Webhook polling
- GitHub
- Stash
- Bitbucket
- Gitlab
- Accept consul configuration for the client
- Add -once flag to run git2consul once
- Better CD/CI pipeline
- Cross-platform builds
- Travis/appveyor
- Need to update diffs on the KV side
- This includes only updating changed files
- Delete untracked files
- If repositories slice is empty, stop the program
- Directory check has to check if it's a repository first
- Runner, and watchers need a Stop() to handle cleanup better
- Handle DoneCh better on both the watcher and runner
- Handle initial load state better
- Watcher should handle initial changes from load state
- Better error handling on LoadRepos()
- Bad configuration should be ignored
- Handle repository error with git reset or re-clone
- On added, modified: PUT KV
- On delete: DEL KV
- On rename: DEL old KV followed by PUT new KV
- repository
- New
- Clone
- Load
- Pull
- Diff
- Ref
- Checkout
- config
- Load
- runner
- New
- watcher
- Watcher
- Interval
- Webhook
- kv
- Handler
- Branch
- KV
- InitHandler
- UpdateHandler
Test suite enhancement:
-
git-init on repo should be done on init()
-
Setup and teardown for each test during
- Setup resets "remote" repo to initial commit
- Teardown cleans local store
-
Instead of testutil, we can use mocks to set up a mock repository.Repository object