Retool to have reloading logic run in command/server

This commit is contained in:
Jeff Mitchell
2016-03-11 16:46:56 -05:00
parent 9e49463642
commit 9f2f5b1c61
8 changed files with 127 additions and 116 deletions

View File

@@ -15,6 +15,13 @@ import (
"github.com/hashicorp/hcl/hcl/ast"
)
// ReloadFunc are functions that are called when a reload is requested.
type ReloadFunc func(string, map[string]string) error
// ReloadFactory can be called to return the desired ID and the associated
// reload function.
type ReloadFactory func() (string, ReloadFunc)
// Config is the configuration for the vault server.
type Config struct {
Listeners []*Listener `hcl:"-"`