Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DrainFunc func() DrainFuncsByName = map[string]func(){} // LameduckFuncsByName are invoked after MarkShutdownStarted and before any // drain function. Their purpose is to signal to clients that the server is // going away (e.g. by sending HTTP/2 GOAWAY frames) without waiting for // in-flight work to drain. Lameduck functions should return quickly; any // long-running drain logic belongs in DrainFunc/DrainFuncsByName. LameduckFuncsByName = map[string]func(){} )
View Source
var ServerCreds credentials.TransportCredentials
Functions ¶
func SetDrainFunc ¶ added in v0.0.294
func SetDrainFunc(f func())
func SetNamedDrainFunc ¶ added in v0.0.346
func SetNamedDrainFunc(name string, f func())
func SetNamedLameduckFunc ¶ added in v0.0.505
func SetNamedLameduckFunc(name string, f func())
SetNamedLameduckFunc registers a lameduck function that runs after MarkShutdownStarted and before any drain function. Lameduck functions signal to clients that the server is going away (typically by triggering HTTP/2 GOAWAY) and should return quickly.
SetNamedLameduckFunc may be called both during initialization and during Listen (e.g. by the foundation framework itself once the http server has been constructed).
func SetServerCredentials ¶ added in v0.0.294
func SetServerCredentials(creds credentials.TransportCredentials)
func SetServerOnlyTLS ¶ added in v0.0.294
func SetServerOnlyTLS(sc *schema.Certificate)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.