Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Server ¶
Server returns an instance of http server with specified name.
Example ¶
// A hello world example. s := g.Server() s.BindHandler("/", func(r *ghttp.Request) { r.Response.Write("hello world") }) s.SetPort(8999) s.Run()
Output:
func SetDebug ¶
func SetDebug(enabled bool)
SetEnabled enables/disables the GoFrame internal logging manually. Note that this function is not concurrent safe, be aware of the DATA RACE, which means you should call this function in your boot but not the runtime.
func SetServerGraceful ¶
func SetServerGraceful(enabled bool)
SetServerGraceful enables/disables graceful reload feature of http Web Server. This feature is disabled in default. Deprecated, use configuration of ghttp.Server for controlling this feature.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.