Documentation ¶
Overview ¶
Package http contains HTTP server and all required stuff for HTTP server working.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is HTTP server.
func NewServer ¶
func NewServer( ctx context.Context, log *zap.Logger, cacher cache.Cacher, resourcesDir string, cfg *config.Config, rdb *redis.Client, ) Server
NewServer creates new server instance.
Directories ¶
Path | Synopsis |
---|---|
Package fileserver contains static files server implementation.
|
Package fileserver contains static files server implementation. |
handlers
|
|
api/settings
Package settings contains API handler for application settings getting.
|
Package settings contains API handler for application settings getting. |
api/version
Package version contains version API handler.
|
Package version contains version API handler. |
generate
Package generate contains RouterOS script generation handler.
|
Package generate contains RouterOS script generation handler. |
healthz
Package healthz contains healthcheck handler.
|
Package healthz contains healthcheck handler. |
metrics
Package metrics contains HTTP handler for application metrics (prometheus format) generation.
|
Package metrics contains HTTP handler for application metrics (prometheus format) generation. |
middlewares
|
|
logreq
Package logreq contains middleware for HTTP requests logging using "zap" package.
|
Package logreq contains middleware for HTTP requests logging using "zap" package. |
nocache
Package nocache contains middleware for HTTP response caching disabling.
|
Package nocache contains middleware for HTTP response caching disabling. |
panic
Package panic contains middleware for panics (inside HTTP handlers) logging using "zap" package.
|
Package panic contains middleware for panics (inside HTTP handlers) logging using "zap" package. |
Click to show internal directories.
Click to hide internal directories.