Skip to content

Commit

Permalink
add file backend to quick start guide (kelseyhightower#727)
Browse files Browse the repository at this point in the history
* add file backend to quick start guide

* add formatting to file backend debug call

* fix my poorly exec'ed fork update
  • Loading branch information
abtreece authored and okushchenko committed Jul 16, 2018
1 parent 3d9acde commit cccd334
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backends/file/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (c *Client) watchChanges(watcher *fsnotify.Watcher, stopChan chan bool) Res
for {
select {
case event := <-watcher.Events:
log.Debug("event: %v", event)
log.Debug(fmt.Sprintf("Event: %s", event))
if event.Op&fsnotify.Write == fsnotify.Write ||
event.Op&fsnotify.Remove == fsnotify.Remove ||
event.Op&fsnotify.Create == fsnotify.Create {
Expand Down
17 changes: 17 additions & 0 deletions docs/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ confd supports the following backends:
* consul
* vault
* environment variables
* file
* redis
* zookeeper
* dynamodb
Expand Down Expand Up @@ -47,6 +48,16 @@ export MYAPP_DATABASE_URL=db.example.com
export MYAPP_DATABASE_USER=rob
```

#### file

myapp.yaml
```
myapp:
database:
url: db.example.com
user: rob
```

#### redis

```
Expand Down Expand Up @@ -165,6 +176,12 @@ confd -onetime -backend dynamodb -table <YOUR_TABLE>
confd -onetime -backend env
```

#### file

```
confd -onetime -backend file -file myapp.yaml
```

#### redis

```
Expand Down

0 comments on commit cccd334

Please sign in to comment.