1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-03-17 22:43:04 +02:00
parent 9cf6f9fa5e
commit 1128a973af
9 changed files with 86 additions and 80 deletions

View File

@@ -421,6 +421,14 @@ func (app *Application) View(writer io.Writer, filename string, layout string, b
return app.view.ExecuteWriter(writer, filename, layout, bindingData)
}
// GetContextPool returns the Iris sync.Pool which holds the contexts values.
// Iris automatically releases the request context, so you don't have to use it.
// It's only useful to manually release the context on cases that connection
// is hijacked by a third-party middleware and the http handler return too fast.
func (app *Application) GetContextPool() *context.Pool {
return app.ContextPool
}
// ConfigureHost accepts one or more `host#Configuration`, these configurators functions
// can access the host created by `app.Run` or `app.Listen`,
// they're being executed when application is ready to being served to the public.