Documentation ¶
Overview ¶
Package configdir monitors a config directory for a supplied file suffix. Channel updates return bytes.Buffer containing all matching files concatenated together.
Updates return only if the update contains a unique byte array from previous runs by calculating md5 checksums.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryUpdates ¶
DirectoryUpdates starts a goroutine and returns bytes.Buffer receive channel
Example ¶
logger = log.New(os.Stderr, "[dircfg]", log.Ldate|log.Ltime|log.Lshortfile, ) chBytes, err := DirectoryUpdates("/etc/server.d", "toml", logger) if err != nil { panic(err) } var b []byte b = <-chBytes // dummy config parser func makeToml(string(b))
Output:
Types ¶
Click to show internal directories.
Click to hide internal directories.