mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-20 16:18:00 +00:00
parent
b0496778e8
commit
f5f48381af
|
@ -31,7 +31,7 @@ func atoiFallback(str string, fallback int) int {
|
||||||
|
|
||||||
// index is the main handler of the API.
|
// index is the main handler of the API.
|
||||||
func index(conf *config.Config) http.Handler {
|
func index(conf *config.Config) http.Handler {
|
||||||
defaultTimeout = conf.Timeout
|
defaultTimeout = conf.HookTimeout
|
||||||
scriptDir = conf.ScriptDir
|
scriptDir = conf.ScriptDir
|
||||||
outputDir = conf.LogDir
|
outputDir = conf.LogDir
|
||||||
return http.HandlerFunc(webhookHandler)
|
return http.HandlerFunc(webhookHandler)
|
||||||
|
|
|
@ -9,7 +9,7 @@ type Config struct {
|
||||||
TLSDomain string `flag:"tls-domain" desc:"TLS domain name used by ACME"`
|
TLSDomain string `flag:"tls-domain" desc:"TLS domain name used by ACME"`
|
||||||
NbWorkers int `flag:"nb-workers" desc:"Number of workers to start" default:"2"`
|
NbWorkers int `flag:"nb-workers" desc:"Number of workers to start" default:"2"`
|
||||||
Debug bool `flag:"debug" desc:"Output debug logs" default:"false"`
|
Debug bool `flag:"debug" desc:"Output debug logs" default:"false"`
|
||||||
Timeout int `flag:"timeout" desc:"Maximum hook execution time in second" default:"10"`
|
HookTimeout int `flag:"hook-timeout" desc:"Maximum hook execution time in second" default:"10"`
|
||||||
ScriptDir string `flag:"scripts" desc:"Scripts location" default:"scripts"`
|
ScriptDir string `flag:"scripts" desc:"Scripts location" default:"scripts"`
|
||||||
PasswdFile string `flag:"passwd-file" desc:"Password file for basic HTTP authentication" default:".htpasswd"`
|
PasswdFile string `flag:"passwd-file" desc:"Password file for basic HTTP authentication" default:".htpasswd"`
|
||||||
LogDir string `flag:"log-dir" desc:"Hook execution logs location" default:""`
|
LogDir string `flag:"log-dir" desc:"Hook execution logs location" default:""`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user