Documentation ¶
Overview ¶
Package reloader provides support for live configuration reloading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicHandler ¶
type AtomicHandler struct {
// contains filtered or unexported fields
}
AtomicHandler provides an atomic http.Handler implementation, allowing safe handler replacement at runtime. AtomicHandler must be initialized with a call to NewAtomicHandler. It will never panic and is safe for concurrent use.
func NewAtomicHandler ¶
func NewAtomicHandler(h http.Handler) *AtomicHandler
NewAtomicHandler creates a new AtomicHandler ready for use.
func (*AtomicHandler) ServeHTTP ¶
func (ah *AtomicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the standard libraries http.Handler interface by atomically passing the request along to the most recently stored handler.
func (*AtomicHandler) Store ¶
func (ah *AtomicHandler) Store(h http.Handler)
Store will update this http.Handler to serve future requests using h.
func (*AtomicHandler) String ¶
func (ah *AtomicHandler) String() string
String implements fmt.Stringer by returning a string literal.
type ConfigFunc ¶
type ConfigFunc func(*conf.GlobalConfiguration)