# README
HTTP Loader
Loads config from a source over HTTP
Usage
Basic usage with a json source and a poll watcher
httpLoader := klhttp.New(&klhttp.Config{
Sources: []Source{
{
URL: "https://konfig.io/config.json",
Method: "GET",
Parser: kpjson.Parser,
},
},
Watch: true,
Rater: kwpoll.Time(10 * time.Second), // Rater is the rater for the poll watcher
})
# Functions
New returns a new Loader with the given Config.
# Variables
ErrNoSources is the error thrown when creating an Loader without sources.
# Interfaces
Client is the interface used to send the HTTP request.