diff options
author | Valery Piashchynski <[email protected]> | 2021-02-23 19:00:44 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-02-23 19:00:44 +0300 |
commit | fdbf6a61600745b5cb1022117dcd9b06d392dc84 (patch) | |
tree | c6b7711f4dfa9873415ff0525887917cc521fd7e /plugins/gzip/plugin.go | |
parent | 7dc61c309a34d21630bc1ad53c53211b3dc985de (diff) |
- Remove unneeded mutex from the `http.Workers` method.
- Rename `checker` plugin package to `status`, remove `/v1` endpoint prefix (#557)
- Add static, headers, status, gzip plugins to the `main.go`.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/gzip/plugin.go')
-rw-r--r-- | plugins/gzip/plugin.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/gzip/plugin.go b/plugins/gzip/plugin.go index eee6c1d3..949c6888 100644 --- a/plugins/gzip/plugin.go +++ b/plugins/gzip/plugin.go @@ -8,19 +8,19 @@ import ( const PluginName = "gzip" -type Gzip struct{} +type Plugin struct{} // needed for the Endure -func (g *Gzip) Init() error { +func (g *Plugin) Init() error { return nil } -func (g *Gzip) Middleware(next http.Handler) http.HandlerFunc { +func (g *Plugin) Middleware(next http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { gziphandler.GzipHandler(next).ServeHTTP(w, r) } } -func (g *Gzip) Name() string { +func (g *Plugin) Name() string { return PluginName } |