summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/caddyhttp.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-03-26 12:00:54 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-03-26 12:00:54 -0600
commit859b5d7ea3b8f660ac68d9aea5a53d25a9a7422c (patch)
treec5baf11ff459d8811104b00c07b0a3c24bd16d9c /modules/caddyhttp/caddyhttp.go
Initial commit
Diffstat (limited to 'modules/caddyhttp/caddyhttp.go')
-rw-r--r--modules/caddyhttp/caddyhttp.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go
new file mode 100644
index 0000000..296e28f
--- /dev/null
+++ b/modules/caddyhttp/caddyhttp.go
@@ -0,0 +1,27 @@
+package caddyhttp
+
+import (
+ "log"
+
+ "bitbucket.org/lightcodelabs/caddy2"
+)
+
+func init() {
+ err := caddy2.RegisterModule(caddy2.Module{
+ Name: "http",
+ New: func() (interface{}, error) { return httpModuleConfig{}, nil },
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
+}
+
+type httpModuleConfig struct {
+ Servers map[string]httpServerConfig `json:"servers"`
+}
+
+type httpServerConfig struct {
+ Listen []string `json:"listen"`
+ ReadTimeout string `json:"read_timeout"`
+ ReadHeaderTimeout string `json:"read_header_timeout"`
+}