1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-09 01:15:54 +02:00

net.Listener moved into config

This commit is contained in:
Marcin Tojek
2016-03-17 18:21:16 +01:00
parent c674ebf505
commit 5ed4d06b3a
3 changed files with 16 additions and 31 deletions

View File

@ -6,7 +6,8 @@ import (
"time"
"github.com/labstack/gommon/log"
"net")
"net"
)
type (
// Engine defines the interface for HTTP server.
@ -17,9 +18,6 @@ type (
// SetLogger sets the logger for the HTTP server.
SetLogger(*log.Logger)
// SetListener sets custom listener for the HTTP server.
SetListener(net.Listener)
// Start starts the HTTP server.
Start()
}
@ -140,6 +138,7 @@ type (
// Config defines engine configuration.
Config struct {
Address string // TCP address to listen on.
Listener net.Listener // Custom net.Listener for the HTTP server.
TLSCertfile string // TLS certificate file path.
TLSKeyfile string // TLS key file path.
ReadTimeout time.Duration // Maximum duration before timing out read of the request.