package servers
import "github.com/gobuffalo/buffalo/servers"
Index ¶
- type Listener
- func UnixSocket(addr string) (*Listener, error)
- func (s *Listener) SetAddr(addr string)
- func (s *Listener) Start(c context.Context, h http.Handler) error
- func (s *Listener) String() string
- type Server
- func Wrap(s *http.Server) Server
- func WrapListener(s *http.Server, l net.Listener) Server
- func WrapTLS(s *http.Server, certFile string, keyFile string) Server
- type Simple
- func New() *Simple
- func (s *Simple) SetAddr(addr string)
- func (s *Simple) Start(c context.Context, h http.Handler) error
- func (s *Simple) String() string
- type TLS
Types ¶
type Listener ¶
Listener server for using a pre-defined net.Listener
func UnixSocket ¶
UnixSocket returns a new Listener on that address
func (*Listener) SetAddr ¶
SetAddr sets the servers address, if it hasn't already been set
func (*Listener) Start ¶
Start the server
func (*Listener) String ¶
String returns a string representation of a Listener
type Server ¶
type Server interface { Shutdown(context.Context) error Start(context.Context, http.Handler) error SetAddr(string) }
Server allows for custom server implementations
func Wrap ¶
Wrap converts a standard *http.Server to a buffalo.Server
func WrapListener ¶
WrapListener wraps an *http.Server and a net.Listener
func WrapTLS ¶
WrapTLS Server converts a standard *http.Server to a buffalo.Server but makes sure it is run with TLS.
type Simple ¶
Simple server
func New ¶
func New() *Simple
New Simple server
func (*Simple) SetAddr ¶
SetAddr sets the servers address, if it hasn't already been set
func (*Simple) Start ¶
Start the server
func (*Simple) String ¶
String returns a string representation of a Simple server
type TLS ¶
TLS server
func (*TLS) SetAddr ¶
SetAddr sets the servers address, if it hasn't already been set
func (*TLS) Start ¶
Start the server
func (*TLS) String ¶
String returns a string representation of a Listener
Source Files ¶
listener.go servers.go simple.go tls.go
- Version
- v1.1.2 (latest)
- Published
- May 17, 2025
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 1 week ago –
Tools for package owners.