aandryashin / reloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reloader

Build Status Coverage Release

Library for automatic reloading configuration files based on file system events.

Using

package main

import (
	"log"
	"time"

	"github.com/aandryashin/reloader"
)

func loadConfig() {
	//...
}

func main() {
	err := reloader.Watch("config", loadConfig, 5*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	//...
}

About

License:Apache License 2.0


Languages

Language:Go 100.0%