Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerLive lifeState = iota ServerReady ServerShuttingDown ServerShuttedDown )
lifecycle states
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitializedEvent ¶
type InitializedEvent struct{}
InitializedEvent is emitted when the server will be started directly afterwards.
type Server ¶
type Server interface { // Middleware Use(middlewares ...func(http.Handler) http.Handler) // Generic routing Handle(pattern string, handler http.Handler) HandleFunc(pattern string, handlerFunc http.HandlerFunc) // HTTP-method routing` Connect(pattern string, handlerFunc http.HandlerFunc) Delete(pattern string, handlerFunc http.HandlerFunc) Get(pattern string, handlerFunc http.HandlerFunc) Head(pattern string, handlerFunc http.HandlerFunc) Options(pattern string, handlerFunc http.HandlerFunc) Patch(pattern string, handlerFunc http.HandlerFunc) Post(pattern string, handlerFunc http.HandlerFunc) Put(pattern string, handlerFunc http.HandlerFunc) Trace(pattern string, handlerFunc http.HandlerFunc) // Server control Shutdown() }
type ShutDownCompletedEvent ¶
type ShutDownCompletedEvent struct{}
ShutDownCompletedEvent is emitted when the server is stopped.
type ShutDownInitiatedEvent ¶
type ShutDownInitiatedEvent struct{}
ShutDownInitiatedEvent is emitted when the server will be stopped directly afterwards.
Click to show internal directories.
Click to hide internal directories.