reloader

package module
v0.0.0-...-da4f1b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

README

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)
	}
	//...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(dir string, load func(), delay time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL